Vb net lostfocus validating
But if I just load the WPF application and tab off the textbox without writing and erasing anything from the textbox, then it is not fired.
You may want to use the Validate event without using the Cancel parameter.
There's usually more than one way to solve a problem, some "better" than others, but you should be happy with yourself for finding a solution in the first place.!
We used to demonstrate this as a thing to avoid in the VB4 classes back in 96 or so.
Because when you do the Set Focus, you leave the one you're in. The Validate event fires before resetting the focus to another control, which is what fires the Lost Focus event. For example, suppose you have a command button with the Default set to true. I've tried using it a few times and always abandoned it.
Hitting the Enter key presses that button without firing the Lost Focus event for the Text Box. We used to demonstrate this as a thing to avoid in the VB4 classes back in 96 or so.
So set the Causes Validation property for the Help or Cancel button to False.