开发者

Adding a property to a silverlight 4 control to add functionality

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜