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