windowsforms-devexpress-dot-xtrabars-dot-barmanager-bbf80ee5.md
Occurs when a control’s PopupContextMenu is about to appear.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event QueryShowPopupMenuEventHandler QueryShowPopupMenu
<DXCategory("Events")>
Public Event QueryShowPopupMenu As QueryShowPopupMenuEventHandler
The QueryShowPopupMenu event's data class is QueryShowPopupMenuEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| BreakShowPopupMenu | Gets or sets whether or not the parent BarManager.QueryShowPopupMenu event should affect only the BarManager itself. |
| Cancel | Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs. |
| Control | Gets a control whose popup menu is queried. |
| Menu | Gets the popup menu that is about to be displayed. |
| Position | Gets or sets the position of the queried menu popup. |
This event allows you to customize the menu assigned to a control’s PopupContextMenu extender property. This property is automatically added at design time to all controls that have the same parent as the BarManager component. At runtime, the PopupContextMenu extender property can be set via the BarManager.SetPopupContextMenu method.
For more information, see the BarManager topic.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the QueryShowPopupMenu event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-spreadsheet-spell-check-cell-text/CS/SpreadsheetSpellchecking/Form1.cs#L22
popupMenu.Manager = BarManager;
BarManager.QueryShowPopupMenu += OnBarManager_QueryShowPopupMenu;
winforms-spreadsheet-spell-check-cell-text/VB/SpreadsheetSpellchecking/Form1.vb#L24
popupMenu.Manager = BarManager
AddHandler Me.BarManager.QueryShowPopupMenu, AddressOf OnBarManager_QueryShowPopupMenu
AddHandler Me.spreadsheetControl.CellEditorOpened, AddressOf OnSpreadsheetControl_CellEditorOpened
See Also