I am curious how I can add a property to add functionality to a control. Currently I am just extending controls, but I was curious if it is possib开发者_StackOverflowle to add a property to add functionality to a control. Like for example the ToolTipService. You can add that to controls. Would it be possible for me to add a property to add a contextmenu without having to extend a textbox lets say? I know about behaviors, but is it possible to do that as a property? Let's say I add a property IsContextMenuBehaviorAdded="True" and that will just attach a behavior, or just add functionality. Any help would be greatly appreciated. Thanks in advance.
If you are looking to add a context menu to a control then you can do that with the Silverlight Toolkit which contains a ContextMenuService
.
精彩评论