Ribbon for WinForms | ComponentOne
Elements / Configuration Toolbar
In This Topic
    Configuration Toolbar
    In This Topic

    The Ribbon Configuration Toolbar (RibbonConfigToolBar) allows the user to place commonly-used commands in a toolbar located in the upper-right corner of the Ribbon. Unlike QAT, this toolbar cannot be moved below the Ribbon. The user can observe that it is present at the same level as the Ribbon tabs.

    The ribbon control depicted in the image below shows a Configuration Toolbar with Ribbon buttons (Cut, Copy and Paste).

    Configuration bar

    Adding Items to Configuration ToolBar at Design-Time

    At design time, you can add items or buttons to the Configuration Toolbar with the help of Items property in the Properties Window of C1Ribbon or RibbonConfigToolBar. You can click the ellipsis next to the Items property to view the Collection Editor. To know more about collection editors, refer this topic.

    Collection editor

    A user can also add items to the Configuration ToolBar through its Ribbon Configuration Floating ToolBar. For more information on floating toolbars, refer this topic.

    Floating toolbar

    Adding Items to Configuration ToolBar via Code

    A user can also add buttons to the Configuration Toolbar programmatically. This is shown in the code below:

    Public Sub ConfigToolbarItems(customRibbon As C1Ribbon)
        'Create Items to be added in the default ConfigToolbar
        Dim cutButton As New RibbonButton("Cut", Image.FromFile("images\cut.png"))
        Dim copyButton As New RibbonButton("Copy", Image.FromFile("images\copy.png"))
        Dim pasteButton As New RibbonButton("Paste", Image.FromFile("images\paste.png"))
    
        ' Add ConfigToolbar items
        customRibbon.ConfigToolBar.Items.Add(cutButton)
        customRibbon.ConfigToolBar.Items.Add(copyButton)
        customRibbon.ConfigToolBar.Items.Add(pasteButton)
    End Sub
    
    public void AddConfigToolbarItems(C1Ribbon customRibbon)
    {
        
        //Create Items to be added in the default ConfigToolbar
        RibbonButton cutButton = new RibbonButton("Cut", Image.FromFile(@"images\cut.png"));
        RibbonButton copyButton = new RibbonButton("Copy", Image.FromFile(@"images\copy.png"));
        RibbonButton pasteButton = new RibbonButton("Paste", Image.FromFile(@"images\paste.png"));
        
        //Add ConfigToolbar items
        customRibbon.ConfigToolBar.Items.Add(cutButton);
        customRibbon.ConfigToolBar.Items.Add(copyButton);
        customRibbon.ConfigToolBar.Items.Add(pasteButton);
       
    }