views:

49

answers:

2

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?

+2  A: 

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.

Claudio Redi
Can you give me a sample, I dont see how you can create a visible-not visible behavior if it isnt available to you.
Nick LaMarca
Well, the control has a lot of protected methods and properties (not visible for class consumers). When you inherits, you'll have access to them. I can't say 100% sure that you'll able to achieve what you want since I don't know those controls but I think it's worth a try.
Claudio Redi
A: 

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 ;)

Pierre 303