private void RenameButton_Click(object sender, RoutedEventArgs e) { RouteListComboBox.Visibility = Visibility.Collapsed; RenameTextBox.Visibility = Visibility.Visible; var rte = RouteListComboBox.SelectedItem as Route; RenameTextBox.Text = rte.Name; Keyboard.Focus(RenameTextBox); RenameTextBox.SelectAll(); }
public RenameView() { InitializeComponent(); Loaded += (o, e) => { RenameTextBox.Focus(); RenameTextBox.SelectAll(); }; }
private void CustomDialogLoaded(object sender, RoutedEventArgs e) { RenameTextBox.SelectAll(); RenameTextBox.Focus(); }
private void AfterLoadHandler(object sender, RoutedEventArgs e) { RenameTextBox.Focus(); RenameTextBox.SelectAll(); Loaded -= AfterLoadHandler; }