RibbonControl.ContextMenuStrip Property

Overrides the ContextMenuStrip property.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v20.1.dll


public override ContextMenuStrip ContextMenuStrip { get; set; }
Public Overrides Property ContextMenuStrip As ContextMenuStrip

Property Value

Type Description

A ContextMenuStrip object.


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