DXSubMenuItem.BeforePopup Event
Allows you to dynamically provide sub-items for the current DXSubMenuItem object.
Namespace: DevExpress.Utils.Menu
Assembly: DevExpress.Utils.v24.1.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
Declaration
Event Data
The BeforePopup event's data class is EventArgs.
Remarks
The DXSubMenuItem is an ancestor for certain popup menus (e.g., DXPopupMenu). It can also be used as an element in popup menus.
If the DXSubMenuItem is a popup menu, the BeforePopup event fires when the menu is about to be displayed onscreen. If the DXSubMenuItem is an element of another menu, the BeforePopup event fires when the root menu is about to be displayed.
You can handle the BeforePopup event to dynamically populate the submenu with items, by adding them to the DXSubMenuItem.Items collection, change the visibility or check states of existing items, etc.