private void MsgHeaderBox_TextChanged(object sender, TextChangedEventArgs e) { Match emailResult = Regex.Match(MsgHeaderBox.Text, headerEmailPattern); if (emailResult.Success) { MsgSubjectBox.Visibility = System.Windows.Visibility.Visible; MsgSubjectLabel.Visibility = System.Windows.Visibility.Visible; } else { MsgSubjectBox.Visibility = System.Windows.Visibility.Hidden; MsgSubjectLabel.Visibility = System.Windows.Visibility.Hidden; MsgSubjectBox.Clear(); } }
private void ClearBtn_Click(object sender, RoutedEventArgs e) { MsgHeaderBox.Clear(); MsgSubjectBox.Clear(); MsgBodyBox.Clear(); }