views:

316

answers:

2

In WinForms I could handle the Validated event to do something after the user changed text in a TextBox. Unlike TextChanged, Validated didn't fire for every character change; it only fired when the user was done.

Is there anything in WPF I can use to get the same result, an event raised only after the user is done changing the text?

+1  A: 

LostFocus will fire when the user moves from your textbox onto any other control.

Martin Harris
A: 

You can also try Binding.ValidationRules

Documented at : http://msdn.microsoft.com/en-us/library/system.windows.data.binding.validationrules.aspx

Here is the article to get started:

How to implement binding validations :

http://msdn.microsoft.com/en-us/library/ms753962.aspx

Signcodeindie