Back to Devexpress

DXMenuItem.Click Event

windowsforms-devexpress-dot-utils-dot-menu-dot-dxmenuitem-09358f4e.md

latest3.7 KB
Original Source

DXMenuItem.Click Event

Occurs when the menu item’s functionality needs to be invoked.

Namespace : DevExpress.Utils.Menu

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
public event EventHandler Click
vb
Public Event Click As EventHandler

Event Data

The Click event's data class is EventArgs.

Remarks

This event occurs when

  • clicking a menu item by the mouse;
  • selecting a menu item using the arrow keys and then pressing the ENTER key;
  • pressing the shortcut which is specified using the ‘&’ character in the DXMenuItem.Caption property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Click event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-pivot-change-summarydisplaytype-in-context-menu/CS/WindowsApplication34/Form1.cs#L44

csharp
DXMenuCheckItem item = new DXMenuCheckItem(str, curentSummaryDisplayType == str);
item.Click += new EventHandler(ItemClick);
item.Tag = e.Field;

winforms-tabbed-mdi-manager-display-custom-header-button/CS/WindowsFormsApplication32/MyTabbedMdiManager/MyTabbedMdiManager.cs#L80

csharp
DXMenuItem menuItem = CreateMenuItem(page);
menuItem.Click += new EventHandler(OnActiveFilesButtonMenuItemClick);
activeFilesPopupMenu.Items.Add(menuItem);

winforms-pivot-change-summarydisplaytype-in-context-menu/VB/WindowsApplication34/Form1.vb#L47

vb
Dim item As New DXMenuCheckItem(str, curentSummaryDisplayType = str)
AddHandler item.Click, AddressOf ItemClick
item.Tag = e.Field

winforms-tabbed-mdi-manager-display-custom-header-button/VB/WindowsFormsApplication32/MyTabbedMdiManager/MyTabbedMdiManager.vb#L62

vb
Dim menuItem As DXMenuItem = CreateMenuItem(page)
AddHandler menuItem.Click, New EventHandler(AddressOf OnActiveFilesButtonMenuItemClick)
activeFilesPopupMenu.Items.Add(menuItem)

See Also

DXMenuItem Class

DXMenuItem Members

DevExpress.Utils.Menu Namespace