Skip to main content

RibbonControl.CustomizeQatMenu Event

Fires when the Quick Access Toolbar customization menu is about to be displayed, allowing commands in the menu to be customized.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Events")]
public event CustomizeQatMenuEventHandler CustomizeQatMenu

Event Data

The CustomizeQatMenu event's data class is DevExpress.XtraBars.Ribbon.CustomizeQatMenuEventArgs.

Remarks

The CustomizeQatMenu event fires when an end-user invokes the customization menu of the Quick Access Toolbar. The ItemLinks property of the CustomizeQatMenuEventArgs object, passed to the event handler as a parameter, provides access to the collection of commands (item links) to be displayed in the customization menu.

This event allows you, for instance, to set the BarItemLink.Visible property of an item link to false to hide a particular command from the customization menu. The following sample event handler shows how to hide the command captioned Exit from the customization menu.

private void ribbon_CustomizeQatMenu(object sender, DevExpress.XtraBars.Ribbon.CustomizeQatMenuEventArgs e) {
    for (int i = 0; i < e.ItemLinks.Count; i++) {
        if (e.ItemLinks[i].Item.Caption == "Exit") {
            e.ItemLinks[i].Visible = false;
            break;
        }
    }
}
See Also