RibbonBar Control for Windows Forms Create innovative user interfaces and build Office 2007 and 2010 ribbon bar design RibbonBar Quick Access Menu Customizing in C#.NET
KetticRibbonBar Quick Access Toolbar is placed above the tabs in RibbonBar control. The ribbon quick access toolbar allows the designers to create shortcuts user interface of ribbon bar. The Quick Access Toolbar is a kettic menu and includes the same menu element as the KetticMenu WinForms control, including the menu items which are shown as images or text, or even both of them, ComboBoxes, Custom Items, and Separators. In this article, we are going through how to build the Quick Access Toolbar by using C# code in .NET projects. C# Add Items to Quick Access Toolbar
KetticRibbonBar control provides the KetticRibbonBar.QuickAccessToolBarItems collection to add items to Quick Access Toolbar. The C# code sample demonstrates how to add two items to quick access toolbar, the KetticMenuItem and the KetticButtonElement. We shall add a NewFile method event handler to the KetticMenuItem and a Print method event handler to the KetticButtonItem. When the users click the items, the methods will be run. The following are the C# code shows how to add menu items to quick access toolbar. KetticMenuItem mnuQANew = new KetticMenuItem(); mnuQANew.Click += new EventHandler(NewFile); mnuQANew.Text = "Menu item: New File"; ketticRibbonBar1.QuickAccessToolBarItems.Add(mnuQANew);
KetticButtonElement mnuQAPrint = new KetticButtonElement(); mnuQAPrint.Click += new EventHandler(Print); mnuQAPrint.Text = "Menu item: Print"; ketticRibbonBar1.QuickAccessToolBarItems.Add(mnuQAPrint);
Relocate Quick Access Toolbar in Ribbon
KetticRibbonBar control for Windows Forms allows the users to place the Quick Access Toolbar below the ribbon bar. This is achieved by modify the property, KetticRibbonBar1.QuickAccessToolbarBelowRibbon, to True. |