Skip to content

Instantly share code, notes, and snippets.

@ichengzi
Created December 1, 2016 08:02
Show Gist options
  • Save ichengzi/0f812a2df3a69aa23ca5b15e5dfd3a51 to your computer and use it in GitHub Desktop.
Save ichengzi/0f812a2df3a69aa23ca5b15e5dfd3a51 to your computer and use it in GitHub Desktop.
wpf技巧
//enter键转tab键:
private void EnterKey_To_TabKey(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
TraversalRequest request = new TraversalRequest(FocusNavigationDirection.Next);
((FrameworkElement)sender).MoveFocus(request);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment