Export (0) Print
Expand All

ControlGroup element

Represents a group of controls in a SizeDefinition layout template.

Usage

<ControlGroup
  SequenceNumber = "xs:positiveInteger">
  child elements
</ControlGroup>

Attributes

AttributeTypeRequiredDescription

SequenceNumber

xs:positiveInteger

No

Valid only when Group is the parent element.

Each SequenceNumber must be unique within a Group element. The values for SequenceNumber should increase for each Group element, but do not need to be sequential.

(xs:positiveInteger)

Any positive integer value between 1000 and 59999, inclusive.

Child elements

ElementDescription

Button

May occur one or more times

CheckBox

May occur one or more times

ComboBox

May occur one or more times

ControlSizeDefinition

May occur one or more times

DropDownButton

May occur one or more times

DropDownColorPicker

May occur one or more times

DropDownGallery

May occur one or more times

FontControl

May occur at most once

InRibbonGallery

May occur one or more times

Spinner

May occur one or more times

SplitButton

May occur one or more times

SplitButtonGallery

May occur one or more times

ToggleButton

May occur one or more times

Parent elements

Element

ControlGroup

Group

GroupSizeDefinition

Row

Remarks

Optional.

May occur one or more times for each Group or ControlGroup element.

If no sequence numbers are supplied, elements are rendered in the order specified in the Ribbon markup.

If Group or ControlGroup is the parent element then ControlGroup is constrained to the following possible child elements: Button, CheckBox, ComboBox, DropDownButton, DropDownColorPicker, DropDownGallery, FontControl, InRibbonGallery, Spinner, SplitButton, SplitButtonGallery, or ToggleButton

Otherwise, when Row or GroupSizeDefinition is the parent, Group is constrained to the following possible child element: ControlSizeDefinition.

Examples

The following code example demonstrates the basic markup for a custom four-button SizeDefinition layout template with various Group elements.


<Group CommandName="cmdButtonGroup2">
  <SizeDefinition>
    <ControlNameMap>
      <ControlNameDefinition Name="button1"/>
      <ControlNameDefinition Name="button2"/>
      <ControlNameDefinition Name="button3"/>
      <ControlNameDefinition Name="button4"/>
    </ControlNameMap>
    <GroupSizeDefinition Size="Large">
      <ControlGroup>
        <ControlSizeDefinition ControlName="button1"
                               ImageSize="Large"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button2"
                               ImageSize="Large"
                               IsLabelVisible="true" />
      </ControlGroup>
      <ColumnBreak ShowSeparator="true"/>
      <ControlGroup>
        <ControlSizeDefinition ControlName="button3"
                               ImageSize="Large"
                              IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button4"
                              ImageSize="Large"
                              IsLabelVisible="true" />
      </ControlGroup>
    </GroupSizeDefinition>
    <GroupSizeDefinition Size="Medium">
      <Row>
        <ControlSizeDefinition ControlName="button1"
                               ImageSize="Small"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button3"
                               ImageSize="Small"
                               IsLabelVisible="true" />
      </Row>
      <Row>
        <ControlSizeDefinition ControlName="button2"
                               ImageSize="Small"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button4"
                               ImageSize="Small"
                               IsLabelVisible="true" />
      </Row>
    </GroupSizeDefinition>
    <GroupSizeDefinition Size="Small">
      <Row>
        <ControlSizeDefinition ControlName="button1"
                               ImageSize="Small"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button3"
                               ImageSize="Small"
                               IsLabelVisible="false" />
      </Row>
      <Row>
        <ControlSizeDefinition ControlName="button2"
                               ImageSize="Small"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button4"
                               ImageSize="Small"
                               IsLabelVisible="false" />
      </Row>
    </GroupSizeDefinition>
  </SizeDefinition>
  <Button CommandName="cmdButtonG21"></Button>
  <Button CommandName="cmdButtonG22"></Button>
  <Button CommandName="cmdButtonG23"></Button>
  <Button CommandName="cmdButtonG24"></Button>
</Group>
<Group CommandName="cmdCheckBoxGroup">
  <CheckBox CommandName="cmdCheckBox"></CheckBox>
</Group>
<Group CommandName="cmdToggleButtonGroup"
       SizeDefinition="OneButton">
  <ToggleButton CommandName="cmdToggleButton"></ToggleButton>
</Group>
<Group CommandName="cmdButtonGroup"
       SizeDefinition="ThreeButtons">
  <Button CommandName="cmdButton1"></Button>
  <Button CommandName="cmdButton2"></Button>
  <Button CommandName="cmdButton3"></Button>
</Group>


Element information

Minimum supported system

Windows 7
Can be emptyNo

See also

Customizing a Ribbon Through Size Definitions and Scaling Policies

 

 

Community Additions

ADD
Show:
© 2014 Microsoft