示例#1
0
        private void KeyDownPopupMinimized(VisualPopupMinimized popupMinimized, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
            case Keys.Tab | Keys.Shift:
            case Keys.Left:
                popupMinimized.SetPreviousFocusItem();
                break;

            case Keys.Tab:
            case Keys.Right:
                popupMinimized.SetNextFocusItem();
                break;

            case Keys.Space:
            case Keys.Enter:
                OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));

                // Get access to the popup for the group
                if (VisualPopupManager.Singleton.CurrentPopup is VisualPopupGroup popupGroup)
                {
                    popupGroup.SetFirstFocusItem();
                }
                break;
            }
        }
        private void KeyDownPopupMinimized(VisualPopupMinimized popupMinimized, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
            case Keys.Tab | Keys.Shift:
            case Keys.Left:
                popupMinimized.SetPreviousFocusItem();
                break;

            case Keys.Tab:
            case Keys.Right:
                popupMinimized.SetNextFocusItem();
                break;
            }
        }
示例#3
0
        private void KeyDownPopupMinimized(VisualPopupMinimized popupMinimized, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
            case Keys.Tab | Keys.Shift:
            case Keys.Left:
                popupMinimized.SetPreviousFocusItem();
                break;

            case Keys.Tab:
            case Keys.Right:
                popupMinimized.SetNextFocusItem();
                break;

            case Keys.Space:
            case Keys.Enter:
                // Exit keyboard mode when you click the button spec
                Ribbon.KillKeyboardMode();

                // Generate a click event
                OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                break;
            }
        }