扩展WPF按钮以将数据存储在新属性中 [英] Extending WPF Button to store data in a new property
本文介绍了扩展WPF按钮以将数据存储在新属性中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想扩展一个WPF按钮来存储一些额外的数据,类似于当前的"Tag"属性.附属物业是前进的方向吗?我要存储的数据将是URL链接字符串,例如,我希望能够执行以下操作:
I want to extend a WPF button to store some extra data, in a similar way to the current "Tag" property. Are attached properties the way forward? The data I want to store will be a URL Link string, for example I would like to be able to do something like:
<Button Tag="BBC World News" URLLink="http://www.bbc.co.uk"/>
有人可以帮助我了解如何扩展按钮吗?
Can anyone help me to understand how to extend the Button?
非常感谢
周杰伦
推荐答案
查看全文