protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);

            if (!e.Handled)
            {
                if (e.Key == Key.Down)
                {
                    // On arrow down key press on TabHeader, try to move
                    // the focus to first element of the corresponding tab.
                    RibbonTab tab = RibbonTab;
                    if (tab != null)
                    {
                        if (tab.MoveFocus(new TraversalRequest(FocusNavigationDirection.First)))
                        {
                            e.Handled = true;
                        }
                    }
                }
                else if (e.Key == Key.Space ||
                         e.Key == Key.Enter)
                {
                    Ribbon ribbon = Ribbon;
                    if (ribbon != null)
                    {
                        if (ribbon.IsMinimized)
                        {
                            if (!ribbon.IsDropDownOpen)
                            {
                                // Open Ribbon dropdown when space/enter is
                                // pressed on a tab header.
                                ribbon.IsDropDownOpen = true;
                                e.Handled             = true;
                            }
                        }
                        else
                        {
                            // Restore the focus if the ribbon is not minimized.
                            Ribbon.RestoreFocusAndCapture(false);
                            e.Handled = true;
                        }
                    }
                }
            }
        }