private void PathText_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { OkButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } }
private void PasteAndGoCommandBinding_OnExecuted(object sender, ExecutedRoutedEventArgs e) { FilesTextBox.SelectAll(); FilesTextBox.Paste(); OkButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); }
private void TxtFindOnKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { OkButton.Focus(); OkButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); } }
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; } }