Skip to main content
A newer version of this page is available. .

DXSubMenuItem.BeforePopup Event

Allows you to dynamically provide sub-items for the current DXSubMenuItem object.

Namespace: DevExpress.Utils.Menu

Assembly: DevExpress.Utils.v19.1.dll

Declaration

public event EventHandler BeforePopup

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.

See Also