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
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:
See Also