Bar

PopupMenuBase.BeforePopup Event

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

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v20.1.dll

Declaration

[DXCategory("Events")]
public event CancelEventHandler BeforePopup
<DXCategory("Events")>
Public Event BeforePopup As CancelEventHandler

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