原文:
private void tbYyrs_KeyUp(object sender, KeyEventArgs e) { UIElement element = Keyboard.FocusedElement as UIElement; if (e.Key == Key.Down || e.Key == Key.Enter) { if (element != null) { element.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); } } if (e.Key == Key.Up) { if (element != null) { element.MoveFocus(new TraversalRequest(FocusNavigationDirection.Previous)); } } }
posted on 2018-07-11 01:15 阅读( ...) 评论( ...)