I have a small problem with focusing in .net/wpf. I have written a custom user control which contains a TextBox
and a SearchButton
. The user-control has a lost focus event, which validate the content of the textbox if the focus is leaving. But now i have the problem, if i click on my search button, the lost focus event of the user control gets fired, even if i click on the button in the custom user control. (The button additionally has the option TabStop="False"
:
The problem is, that i don't want to fire the event, if i click on the button.
Does any one has an idea?
Thank you!