User Interface / Widgets / Ribbon / Layout Panels / Ribbon Collapsible Panel
In This Topic
    Ribbon Collapsible Panel
    In This Topic

    The ribbon collapsible panel is implemented by the NRibbonCollapsiblePanel class and is typically used to hold a set of buttons that are placed in left to right direction when the ribbon group is in large state and in top to bottom direction when the group goes to medium state. This conserves space and makes the panel more compact.

    The maximum number of rows when the panel is collapsed (i.e. in Medium and Small states) is controlled through the MaxRowCount property. It is set to 3 by default, which is the number that the Microsoft Office ribbon interface uses, too. The following piece of code demonstrates how to create the ribbon collapsible panel shown above:

    Create Ribbon Collapsible Panel
    Copy Code
    NRibbonCollapsiblePanel panel = new NRibbonCollapsiblePanel();
     
    NRibbonButton button = new NRibbonButton("Cover Page");
    button.LargeImage = NResources.Image_32x32_cover_page_png;
    button.SmallImage = NResources.Image_16x16_cover_page_png;
    panel.Add(button);
    
    button = new NRibbonButton("Blank Page");
    button.LargeImage = NResources.Image_32x32_page_png;
    button.SmallImage = NResources.Image_16x16_page_png;
    panel.Add(button);
    
    button = new NRibbonButton("Page Break");
    button.LargeImage = NResources.Image_32x32_page_break_png;
    button.SmallImage = NResources.Image_16x16_page_break_png;
    panel.Add(button);
    
    See Also