RibbonGroupSection

Represents a Section control in the SharePoint Server Ribbon.

Inheritance Hierarchy


Assembly: QASPRibbon.dll
Namespace: QASPRibbon.Controls

Properties

Property Type Description
Id String A string that identifies the group, such as "RibbonGroup". (Inherited from RibbonElement)
Title String Group's label. (Inherited from RibbonElement)
Sequence Int32 Order of placement among sibling XML nodes.
Controls IEnumerable<RibbonControl> A collection of child controls.
Visible Boolean A value that indicates whether a button control is rendered on the ribbon. (Inherited from RibbonControl)
Alignment RibbonGroupAlignment An enumeration value that specifies the vertical alignment of controls within the group. The default value is Top.
Template RibbonGroupTemplate An enumeration value that specifies the template type of the group. The default is OneRow.
DisplayMode RibbonDisplayMode An enumeration value that determines how controls in the group are rendered. The default is Image32AndCaption.

Constructors

public RibbonGroupSection()

public RibbonGroupSection(string id)

public RibbonGroupSection(string id, string title)

Examples

Define group with three sections:
// Define the tab
var demoTab = new RibbonTab("DemoTab", "Demo Tab");
// Define the group
var demoGroup = new RibbonGroup("DemoGroup", "Demo Group");

// _demoButtons() returns array of RibbonButton elements

// Define section (one row)
var demoSectionOneRow = new RibbonGroupSection
    {
        DisplayMode = RibbonDisplayMode.Image32AndCaption,
        Type = RibbonSectionType.OneRow,
        Controls = _demoButtons()
    };
// Define section (two rows)
var demoSectionTwoRows = new RibbonGroupSection
{
    DisplayMode = RibbonDisplayMode.Image32AndCaption,
    Type = RibbonSectionType.TwoRows,
    Controls = _demoButtons()
};
// Define section (three rows)
var demoSectionThreeRows = new RibbonGroupSection
{
    DisplayMode = RibbonDisplayMode.Image32AndCaption,
    Type = RibbonSectionType.ThreeRows,
    Controls = _demoButtons()
};
// Use sections in the group
demoGroup.Sections = new []
    {
        demoSectionOneRow,
        RibbonGroupSection.Divider, // Divider
        demoSectionTwoRows,
        RibbonGroupSection.Divider,
        demoSectionThreeRows
    };
            
demoTab.Groups = new [] {demoGroup};

// Register tab
RibbonManager.Current.AddTabToPage(demoTab, Page, true);


Result in browser:
Group with three sections (onerow, tworows and threerows) and two delimeters

See also

RibbonGroup
RibbonTab

Last edited Aug 25, 2013 at 8:40 AM by VitalyZhukov, version 3

Comments

No comments yet.