예제 #1
0
 private void TextField_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         LinkField.Focus(FocusState.Keyboard);
         e.Handled = true;
     }
 }
예제 #2
0
 private void TLContentDialog_Opened(ContentDialog sender, ContentDialogOpenedEventArgs args)
 {
     if (string.IsNullOrWhiteSpace(TextField.Text))
     {
         TextField.Focus(FocusState.Programmatic);
     }
     else
     {
         LinkField.Focus(FocusState.Programmatic);
     }
 }
예제 #3
0
 private void TextField_Loaded(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(TextField.Text))
     {
         TextField.Focus(FocusState.Keyboard);
     }
     else
     {
         LinkField.Focus(FocusState.Keyboard);
     }
 }