Microsoft.Windows.Controls.Ribbon.RibbonGallery.OnPreviewKeyDown C# (CSharp) Méthode

OnPreviewKeyDown() protected méthode

Gallery's ScrollViewer handles up/down arrow keys and marks the KeyDown event handled even if the next focusable element is not its descendant. The logic here enables navigation to outside the gallery (for e.g. from the last/first galleryItem to gallery's sibling MenuItem).
protected OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
Résultat void
        protected override void OnPreviewKeyDown(KeyEventArgs e)
        {
            base.OnPreviewKeyDown(e);

            if (!e.Handled)
            {
                DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
                OnNavigationKeyDown(e, focusedElement);
            }
        }
RibbonGallery