开发者

Add A New Property To A Third Party Control

I am working with dev ex controls and on a menu bar item there isnt a property for setting the button to Visible or not Not Visible.

Can you add properties like this to pre made controls? If so how would you 开发者_运维百科do it?


If allowed (control class not marked as sealed), you should create another control that inherits from your dev ex control in order to add extra properties.


An alternative if you can use inheritance.

You can create extension methods that will act like properties.

GetCompanyName()

SetCompanyName()

After all, properties are language shortcut to create them at compilation ;)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜