Beispiel #1
0
        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();
        }
Beispiel #2
0
        public RenameView()
        {
            InitializeComponent();

            Loaded += (o, e) =>
            {
                RenameTextBox.Focus();
                RenameTextBox.SelectAll();
            };
        }
Beispiel #3
0
 private void CustomDialogLoaded(object sender, RoutedEventArgs e)
 {
     RenameTextBox.SelectAll();
     RenameTextBox.Focus();
 }
Beispiel #4
0
 private void AfterLoadHandler(object sender, RoutedEventArgs e)
 {
     RenameTextBox.Focus();
     RenameTextBox.SelectAll();
     Loaded -= AfterLoadHandler;
 }