Back to Devexpress

BarManager.GetPopupContextMenu(Control) Method

windowsforms-devexpress-dot-xtrabars-dot-barmanager-dot-getpopupcontextmenu-x28-system-dot-windows-dot-forms-dot-control-x29.md

latest2.5 KB
Original Source

BarManager.GetPopupContextMenu(Control) Method

Gets the popup menu assigned to a control.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(null)]
[DXCategory("BarManager")]
public PopupMenuBase GetPopupContextMenu(
    Control control
)
vb
<DefaultValue(Nothing)>
<DXCategory("BarManager")>
Public Function GetPopupContextMenu(
    control As Control
) As PopupMenuBase

Parameters

NameTypeDescription
controlControl

The control whose popup menu is to be returned.

|

Returns

TypeDefaultDescription
PopupMenuBasenull

The popup menu assigned to the control.

|

Remarks

With the help of the BarManager component, you can associate popup context menus with external controls. These menus will be opened when right-clicking the controls.

The BarManager.SetPopupContextMenu method assigns a context menu to a control. The GetPopupContextMenu method returns the assigned menu. To assign a menu to a control at design time, use the PopupContextMenu extender property exposed by a control (ensure that the BarManager component has been dropped onto the same form). For more information, see the BarManager topic.

See Also

SetPopupContextMenu(Control, PopupMenuBase)

QueryShowPopupMenu

BarManager

BarManager Members

DevExpress.XtraBars Namespace