Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RibbonControl.OptionsExpandCollapseMenu Property

Gets the availability and behavior settings of the Ribbon Display Options popup menu.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("Behavior")]
[XtraSerializableProperty(XtraSerializationVisibility.Content)]
public RibbonOptionsExpandCollapseMenu OptionsExpandCollapseMenu { get; }

#Property Value

Type Description
RibbonOptionsExpandCollapseMenu

An object with settings that specify the availability and behavior of the Ribbon Display Options popup menu.

#Remarks

The following example demonstrates how to enable the Ribbon Display Options menu:

using DevExpress.Utils;
using DevExpress.XtraBars.Ribbon;

private void Form1_Load(object sender, EventArgs e) {
    EnableRibbonExpandCollapseMenu();
}
void EnableRibbonExpandCollapseMenu() {
    ribbonControl1.OptionsExpandCollapseMenu.EnableExpandCollapseMenu = DefaultBoolean.True;
    ribbonControl1.OptionsExpandCollapseMenu.ShowRibbonLayoutGroup = DefaultBoolean.True;
    ribbonControl1.ExpandCollapseMenuShowing += RibbonControl1_ExpandCollapseMenuShowing;
}
private void RibbonControl1_ExpandCollapseMenuShowing(object sender, ExpandCollapseMenuShowingEventArgs e) {
    // Use 'e.Menu' to add new menu items aor customize the existing menu items.
    // e.Menu.AddItem(barItem);
    // e.Menu.ItemLinks[0].Caption = "CUSTOM_CAPTION";

    // Prevents the menu from being displayed.
    // e.Allow = false;
}

The following screenshot shows the result:

Ribbon Display Options Menu

See Also