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

PopupMenuBase.BeforePopup Event

Allows you to customize the popup menu before it is displayed onscreen.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Navigation

Declaration

[DXCategory("Events")]
public event CancelEventHandler BeforePopup

Event Data

The BeforePopup event's data class is CancelEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled.

Remarks

You can handle the BeforePopup event to customize the popup menu before it is displayed onscreen. For instance, you can add, remove or disable particular links. Use the PopupMenuBase.ItemLinks property to access the link collection of the popup menu.

The BeforePopup event occurs when the popup window is about to be displayed even if it does not contain any items within the ItemLinks collection. So, you can use the event to dynamically populate the popup menu. Note that if the popup menu does not contain links, it will not be displayed.

After the popup menu is displayed, the PopupMenuBase.Popup event is fired.

See Also