Skip to main content
All docs
V24.2

RibbonOptionsExpandCollapseMenu.EnableExpandCollapseMenu Property

Gets or sets a value that specifies the availability of the Ribbon Display Options popup menu.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v24.2.dll

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
[XtraSerializableProperty]
public DefaultBoolean EnableExpandCollapseMenu { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

True to enable the Ribbon Display Options menu; otherwise, False.

Available values:

Name Description Return Value
True

The value is true.

0

False

The value is false.

1

Default

The value is specified by a global option or a higher-level object.

2

Property Paths

You can access this nested property as listed below:

Object Type Path to EnableExpandCollapseMenu
RibbonControl
.OptionsExpandCollapseMenu .EnableExpandCollapseMenu

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