private void Txt_Email_LostFocus(object sender, RoutedEventArgs e) { try { SetEmailTxtColor(_loginLogic.ValidEmail(Txt_Email.Text)); } catch (InvalidEmail ex) { SetEmailTxtColor(false); Lbl_Warning.Content = ex.Message; Lbl_Warning.Visibility = Visibility.Visible; } }