Back to Devexpress

PopupMenuBase.Manager Property

windowsforms-devexpress-dot-xtrabars-dot-popupmenubase-a775f69b.md

latest3.5 KB
Original Source

PopupMenuBase.Manager Property

Specifies the BarManager responsible for managing the PopupMenuBase object.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(null)]
[DXCategory("Manager")]
public virtual BarManager Manager { get; set; }
vb
<DXCategory("Manager")>
<DefaultValue(Nothing)>
Public Overridable Property Manager As BarManager

Property Value

TypeDefaultDescription
BarManagernull

A BarManager responsible for managing the PopupMenuBase object.

|

Remarks

For the PopupMenuBase object to work correctly, it must be bound to a BarManager or RibbonControl object. If the menu is not bound to the BarManager/RibbonControl, the menu is not displayed. Items displayed by the popup menu belong to the bound BarManager/RibbonControl.

When you drop a popup menu to a form at design time, it searches for a Bar Manager or Ribbon Control within this form. If any of these objects is found, the popup menu is bound to it. When creating a popup menu at runtime, you need to manually bind the menu to the BarManager/Ribbon Control via the menu’s constructor, the Manager or PopupMenuBase.Ribbon property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Manager property.

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#L21

csharp
popupMenu.Manager = BarManager;
BarManager.QueryShowPopupMenu += OnBarManager_QueryShowPopupMenu;

winforms-spreadsheet-spell-check-cell-text/VB/SpreadsheetSpellchecking/Form1.vb#L23

vb
spellChecker.SpellCheckMode = SpellCheckMode.AsYouType
popupMenu.Manager = BarManager
AddHandler Me.BarManager.QueryShowPopupMenu, AddressOf OnBarManager_QueryShowPopupMenu

See Also

PopupMenuBase Class

PopupMenuBase Members

DevExpress.XtraBars Namespace