I want to add a little Button, which removes all the text in the TextBox. Is it possible to put this "Remove"-Button into the TextBox (like in the iPhone Textboxs)?
I hope after your help it looks like that:
I played something with the controltemplate but didn't get the wished result.
One way to solve this problem could be to use negative margins of the button, but i think that isn't a clean solution.
Thank you!
Got something using interactivity, but you probably can manage without:
You could make the button only show upon TextBox-MouseOver by adding this style to it:
You can easily derive from textbox and create your own textbox with the functionality you want.That is the flexibility that wpf provides.See the link below
http://davidowens.wordpress.com/2009/02/18/wpf-search-text-box/
Assuming you don't want text or the cursor to disappear behind the button, the only clean way is to re-template the
TextBox
. If you're not really fussed about that, then you could just do this: