Exemplo n.º 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();
        }
Exemplo n.º 2
0
        public RenameView()
        {
            InitializeComponent();

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