protected void Grid_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.Tab:
                e.SuppressKeyPress = true;

                if (e.Modifiers == Keys.None)
                {
                    BackButton.Focus();
                }
                else if (e.Modifiers == Keys.Shift)
                {
                    CancelCloseButton.Focus();
                }

                break;

            case Keys.Enter:
                e.SuppressKeyPress = true;
                BrowseButton.PerformClick();
                break;

            case Keys.Back:
                e.SuppressKeyPress = true;
                BackButton.PerformClick();
                break;
            }
        }
Example #2
0
 private void KeyGraphFeaturesPanel_Loaded(object sender, RoutedEventArgs e)
 {
     BackButton.Focus(FocusState.Programmatic);
 }