Skip to main content

OfficeNavigationBar.PopupMenuShowing Event

Allows you to customize a context menu for OfficeNavigationBar elements.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("BarManager")]
public event NavigationBarPopupMenuShowingEventHandler PopupMenuShowing

Event Data

The PopupMenuShowing event's data class is DevExpress.XtraBars.Navigation.NavigationBarPopupMenuShowingEventArgs.

Remarks

The Customization Button (see OfficeNavigationBar.CustomizationButtonVisibility) has a non-empty context menu, while items have empty context menus, so the item context menus are not displayed, by default.

The PopupMenuShowing event fires when the Customization Button’s context menu or an item’s context menu is about to be invoked. You can handle this event to add custom commands to context menus via the event’s Menu property. If you need to prevent a non-empty menu from being invoked, set the event’s Cancel parameter to true.

The event’s Menu parameter specifies a NavigationBarMenu object, which is a DXPopupMenu class descendant. See the DXPopupMenu topic for information on available menu items and for an example of adding items to the menu.

See Also