Exemplo n.º 1
0
 private void Dialog_Loaded(object sender, RoutedEventArgs e)
 {
     PART_TextBox.SelectAll();
     switch (DialogSettings.ColorScheme)
     {
     case MetroDialogColorScheme.Accented:
         PART_NegativeButton.Style = FindResource("HighlightedSquareButtonStyle") as Style;
         PART_TextBox.SetResourceReference(ForegroundProperty, "BlackColorBrush");
         break;
     }
 }
Exemplo n.º 2
0
 private void PartTextBoxOnTextChanged(object sender, TextChangedEventArgs e)
 {
     this.PART_TextBox.TextChanged -= PartTextBoxOnTextChanged;
     //if (Application.Current.MainWindow.IsActive)
     {
         PART_TextBox.Focus();
         PART_TextBox.SelectAll();
         //
         //PART_TextBox.RaiseEvent(new KeyboardFocusChangedEventArgs(Keyboard.PrimaryDevice, 0, null, PART_TextBox) { RoutedEvent = Keyboard.GotKeyboardFocusEvent, Source = PART_TextBox });
     }
 }
Exemplo n.º 3
0
 private void OnTextBoxGotKeyBoardFocus(object sender, RoutedEventArgs e)
 {
     PART_TextBox.SelectAll();
 }