I trying to create new class object that derivative from TextBox –
If there is chars in the TextBox – the new object will show some button and pressing on this button will be able to remove the chars in this TextBox
how can i make the derivative from control in WPF ?
You could create a new UserControl with a textbox and a button. You bind a string property to the textbox and to the visibility-property of your button. Then you create a converter which converts this string to a visibility. Now you bind the Command-property of your button to a command which sets the string property = string.Empty.
A few hints:
How to use Converters:
How your VM could look like: