Re:How to validate multiple textboxes on lostfocus in silverlight
Hi,
Please let me know how to validate mutiple textboxes in Silverlight3 on LostFocus event. I tried with LostFocus event but the application gets hanged for tab changes.
private void txtFirstName_LostFocus(object sender, RoutedEventArgs e)
{
txtFirstName.ClearValidationError();
if (string.IsNullOrEmpty(txtFirstName.Text))
{
txtFirstName.SetValidation("Please enter First Name");
txtFirstName.RaiseValidationError();
IsValid = false;
txtFirstName.Focus();
}
}
Thanks in advance.