How to add ToolStripItem to quick access toolbar programmatically in the WinForms RibbonControlAdv?
Adding items to QAT
To add the ToolStripItem to QAT programmatically, use the Header property and the AddQuickItem function of the WinForms RibbonControlAdv. To load QAT items, you have to typecast the ToolStripItem as the QuickButtonReflectable type.
C#
//Adds the item in the Quick Access ToolBar. this.ribbonControlAdv1.Header.AddQuickItem(new Syncfusion.Windows.Forms.Tools.QuickButtonReflectable(this.openToolStripButton)); this.ribbonControlAdv1.Header.AddQuickItem(new Syncfusion.Windows.Forms.Tools.QuickButtonReflectable(this.saveToolStripButton));
VB
'Adds the item in the Quick Access ToolBar. Me.ribbonControlAdv1.Header.AddQuickItem(New Syncfusion.Windows.Forms.Tools.QuickButtonReflectable(Me.openToolStripButton)) Me.ribbonControlAdv1.Header.AddQuickItem(New Syncfusion.Windows.Forms.Tools.QuickButtonReflectable(Me.saveToolStripButton))
Figure 1: RibbonForm without adding the ToolStripItems in Quick Access ToolBar
Figure 2: ToolStripItems are added to the Quick Access ToolBar in RibbonForm
Figure 3: Before reflecting Quick items in the Quick Access ToolBar
Figure 4: Quick items reflected in the “Customize Quick Access ToolBar”
Samples:
C#: https://www.syncfusion.com/downloads/support/directtrac/141998/ze/RibbonControlAdv-702687587
VB: https://www.syncfusion.com/downloads/support/directtrac/141998/ze/RibbonControlAdv_VB786234609
Reference link: https://help.syncfusion.com/windowsforms/ribbon/quick-access-toolbar
Conclusion
I hope you enjoyed learning about how to add ToolStripItem to quick access toolbar programmatically in the WinForms RibbonControlAdv.
You can refer to our WinForms RibbonControlAdv’s feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms RibbonControlAdv documentation to understand how to present and manipulate data.
For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms RibbonControlAdv and other WinForms components.If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!