Class StaticMenuEvents
Provides a collection of static events and methods for managing and interacting with menu-related actions.
public static class StaticMenuEvents
- Inheritance
-
StaticMenuEvents
Remarks
The StaticMenuEvents class defines a set of events that are triggered in response to various menu-related actions, such as opening, closing, or interacting with menu items. These events are primarily intended for use with menus and their associated menu items. Additionally, the class provides static methods to raise these events programmatically.
This class is useful for scenarios where centralized handling of menu events is required, such as in applications with dynamic or context-sensitive menus.
Methods
- RaiseItemChanged(MenuItem, BaseEventArgs<MenuChangeKind>)
Raises the ItemChanged event.
- RaiseItemCheckedChanged(MenuItem, EventArgs)
Raises the ItemCheckedChanged event.
- RaiseItemClick(MenuItem, EventArgs)
Raises the ItemClick event.
- RaiseItemClickActionChanged(MenuItem, EventArgs)
Raises the ItemClickActionChanged event.
- RaiseItemClosed(MenuItem, EventArgs)
Raises the ItemClosed event.
- RaiseItemDisabledImageChanged(MenuItem, EventArgs)
Raises the ItemDisabledImageChanged event.
- RaiseItemEnabledChanged(MenuItem, EventArgs)
Raises the ItemEnabledChanged event.
- RaiseItemHighlighted(MenuItem, EventArgs)
Raises the ItemHighlighted event.
- RaiseItemImageChanged(MenuItem, EventArgs)
Raises the ItemImageChanged event.
- RaiseItemInserted(Menu, MenuChangeEventArgs)
Raises the "item inserted" events to notify subscribers that a new menu item has been inserted.
- RaiseItemOpened(MenuItem, EventArgs)
Raises the ItemOpened event.
- RaiseItemRemoved(Menu, MenuChangeEventArgs)
Raises the "item removed" events to notify subscribers that a menu item has been removed.
- RaiseItemRoleChanged(MenuItem, EventArgs)
Raises the ItemRoleChanged event.
- RaiseItemShortcutChanged(MenuItem, EventArgs)
Raises the ItemShortcutChanged event.
- RaiseItemTextChanged(MenuItem, EventArgs)
Raises the ItemTextChanged event.
- RaiseItemVisibleChanged(MenuItem, EventArgs)
Raises the ItemVisibleChanged event.
- RaiseMenuClosing(ContextMenu, EventArgs)
Raises the MenuClosing event.
- RaiseMenuOpening(ContextMenu, CancelEventArgs)
Raises the MenuOpening event.
Events
- ContextMenuItemRemoved
Occurs when an item is removed from the context menu.
- ItemChanged
Occurs when a change in the menu item is detected, providing details about the type of change.
- ItemCheckedChanged
Occurs when the Checked property changes.
- ItemClick
Occurs when the menu item is clicked.
- ItemClickActionChanged
Occurs when the click action associated with the menu item has changed.
- ItemClosed
Occurs when menu item is closed.
- ItemDisabledImageChanged
Occurs when the DisabledImage property changes.
- ItemEnabledChanged
Occurs when the value of the Enabled property changes.
- ItemHighlighted
Occurs when menu item is highlighted.
- ItemImageChanged
Occurs when the Image property changes.
- ItemInserted
Occurs when a new item is inserted into the items of MenuItem.
- ItemOpened
Occurs when menu item is opened.
- ItemRemoved
Occurs when an item is removed from the items of MenuItem.
- ItemRoleChanged
Occurs when the Role property changes.
- ItemShortcutChanged
Occurs when the Shortcut property changes.
- ItemTextChanged
Occurs when the Text property value changes.
- ItemVisibleChanged
Occurs when the value of the Visible property changes.
- MainMenuItemRemoved
Occurs when an item is removed from the main menu.
- MenuClosing
Occurs when the menu is closing. This event is usually raised only for top level menus.
- MenuOpening
Occurs when the menu is opening. This event is usually raised only for top level menus. You can also handle Opened to be notified when a menu item is opened.