Microsoft.Windows.Controls.Ribbon.RibbonGalleryItem.OnKeyUp C# (CSharp) Method

OnKeyUp() protected method

This is the method that responds to the KeyUp event.
protected OnKeyUp ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs Event arguments
return void
        protected override void OnKeyUp(KeyEventArgs e)
        {
            if (e.Key == Key.Space)
            {
                // Alt+Space should bring up system menu, we shouldn't handle it.
                if ((Keyboard.Modifiers & ModifierKeys.Alt) != ModifierKeys.Alt)
                {
                    if (e.OriginalSource == this)
                    {
                        SetSelectedOnInput();
                        IsPressed = false;
                        e.Handled = true;
                    }
                }
            }

            base.OnKeyUp(e);
        }