I want to add a Property such as 'Description' to Button control, that i use it in Tooltip. how can i add a property to a control?
0
votes
3 Answers
1
votes
Attached properties are not added to any specific control.
Attached properties are defined in static class, and can be used with any UI control.
Refer to this link to for walkthrough to Add custom attached property.
You can Bind ToolTipService to display tooltip. You need to bind it to Description attached property.
If you want to put property in only one control (so that other controls cannot use it), you need to extend the control, and define Dependency property in it.
1
votes