Skip to main content
A newer version of this page is available.

RibbonControl.ContextMenuStrip Property

Overrides the ContextMenuStrip property.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v19.2.dll

Declaration

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

Property Value

Type Description
ContextMenuStrip

A ContextMenuStrip 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 ContextMenuStrip 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