ComponentFactory.Krypton.Ribbon.ViewLayoutRibbonScrollPort.RibbonViewControl.ProcessDialogKey C# (CSharp) Method

ProcessDialogKey() protected method

Processes a dialog key.
protected ProcessDialogKey ( Keys keyData ) : bool
keyData Keys One of the Keys values that represents the key to process.
return bool
            protected override bool ProcessDialogKey(Keys keyData)
            {
                // Grab the controlling control that is a parent
                Control c = _ribbon.GetControllerControl(this);

                // Grab the view manager handling the focus view
                ViewBase focusView = null;
                if (c is VisualPopupGroup)
                {
                    ViewRibbonPopupGroupManager manager = (ViewRibbonPopupGroupManager)((VisualPopupGroup)c).GetViewManager();
                    focusView = manager.FocusView;
                }
                else if (c is VisualPopupMinimized)
                {
                    ViewRibbonMinimizedManager manager = (ViewRibbonMinimizedManager)((VisualPopupMinimized)c).GetViewManager();
                    focusView = manager.FocusView;
                }

                // When in keyboard mode...
                if (focusView != null)
                {
                    // We pass movements keys onto the view
                    switch (keyData)
                    {
                        case Keys.Tab | Keys.Shift:
                        case Keys.Tab:
                        case Keys.Left:
                        case Keys.Right:
                        case Keys.Up:
                        case Keys.Down:
                        case Keys.Space:
                        case Keys.Enter:
                            _ribbon.KillKeyboardKeyTips();
                            focusView.KeyDown(new KeyEventArgs(keyData));
                            return true;
                    }
                }

                return base.ProcessDialogKey(keyData);
            }
ViewLayoutRibbonScrollPort.RibbonViewControl