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

OfficeNavigationBar.PopupMenuShowing Event

Allows you to customize a context menu for OfficeNavigationBar elements.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v24.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