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