Skip to main content

RibbonControl.ContextMenu Property

Overrides the ContextMenu property.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v24.2.dll

Declaration

[Browsable(false)]
public override ContextMenu ContextMenu { get; set; }

Property Value

Type Description
ContextMenu

A ContextMenu object.

Remarks

Typically there is no need to assign a single context menu to a RibbonControl, as the control consists of multiple elements, and you may wish to invoke different menus for different elements. Therefore, the ContextMenu property is overridden to hide it at design time.

You can provide different popup menus for the control’s elements by handling specific events. For example, you can handle the MouseDown event. In this event handler, check which element has been clicked by calling the RibbonControl.CalcHitInfo method, and if the required element has been clicked, display a specific menu by calling its Show method.

See Also