예제 #1
0
 private void PathText_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         OkButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
     }
 }
예제 #2
0
        private void PasteAndGoCommandBinding_OnExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            FilesTextBox.SelectAll();
            FilesTextBox.Paste();

            OkButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
        }
예제 #3
0
 private void TxtFindOnKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         OkButton.Focus();
         OkButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
     }
 }
예제 #4
0
        void InputNameKeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Enter:
                OkButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
                break;

            case Key.Escape:
                CancelButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
                break;
            }
        }