System.Windows.Forms.CommandBarContextMenu.MenuBarItem.OnSelect C# (CSharp) Method

OnSelect() protected method

protected OnSelect ( EventArgs e ) : void
e System.EventArgs
return void
            protected override void OnSelect(EventArgs e)
            {
                CommandBarContextMenu contextMenu = this.GetContextMenu() as CommandBarContextMenu;
                if (contextMenu == null)
                {
                    return;
                    //throw new NotSupportedException();
                }

                contextMenu.SelectedMenuItem = this;
                base.OnSelect(e);
            }