How to remove minimize the ribbon item from QAT dropdown in WinForms RibbonControlAdv?
Remove the minimize ribbon item
In the RibbonControlAdv, the Ribbon Minimize button is visible, by default. The Minimize button can be customized by using the property, ShowMinimizeButton. However, the Minimize the Ribbon option shows in the QAT DropDown. The DropDown Items can be customized by handling the BeforeCustomizeDropDownPopup event. By using this event, QAT DropDown items can be added or removed based on the user requirement.
C#
//Hides the Ribbon Minimize button. this.ribbonControlAdv1.ShowMinimizeButton = false; //This event occurs before the DropDown popup. this.ribbonControlAdv1.BeforeCustomizeDropDownPopup += new DropDownEventHandler(ribbonControlAdv1_BeforeCustomizeDropDownPopup); void ribbonControlAdv1_BeforeCustomizeDropDownPopup(object sender, DropDownEventArgs e) { //Removes the specified item. e.DropDown.Items.RemoveAt(e.DropDown.Items.Count - 1); }
VB
'Hides the Ribbon Minimize button. Me.ribbonControlAdv1.ShowMinimizeButton = False 'This event occurs before the DropDown popup. AddHandler ribbonControlAdv1.BeforeCustomizeDropDownPopup, AddressOf ribbonControlAdv1_BeforeCustomizeDropDownPopup Private Sub ribbonControlAdv1_BeforeCustomizeDropDownPopup(ByVal sender As Object, ByVal e As DropDownEventArgs) 'Removes the specified item. e.DropDown.Items.RemoveAt(e.DropDown.Items.Count - 1) End Sub
Figure 1: Ribbon Minimize button in the RibbonForm
Figure 2: “Minimize the Ribbon” option in the QAT DropDown
Figure 3: Ribbon Minimize button hidden in the RibbonForm
Figure 4: “Minimize the Ribbon” option hidden in the QAT DropDown
Samples:
C#: https://www.syncfusion.com/downloads/support/directtrac/114877/ze/Ribbon_QAT_Item-2021116074
VB: https://www.syncfusion.com/downloads/support/directtrac/114877/ze/Ribbon_QAT_Item_VB-1783759437