Reputation: 41
I a trying to change the TextBox wpf control so that it would include an extra property (a string). Is it possible to change an existing control? Would it be possible to create a new control that inherits from TextBox?
Upvotes: 0
Views: 821
Reputation: 5771
You cannot add an extra property to the TextBox control. You can however inherit from the TextBox control and make your own control. Add your extra properties in your custom control.
Having said that, if you have a single property that you require, you can always use the Tag property for your custom requirements.
Upvotes: 1