Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXSubMenuItem.BeforePopup Event

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

Namespace: DevExpress.Utils.Menu

Assembly: DevExpress.Utils.v24.2.dll

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

#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