private void SubmitButton_Click(object sender, RoutedEventArgs e) { // Show an error string near the phone field. PhoneFieldDescription.Visibility = Visibility.Visible; // Move the customer to the problem field. PhoneField.Focus(FocusState.Programmatic); }