ControlGroup 要素

SizeDefinition レイアウト テンプレート内のコントロールのグループを表します。

使用

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

属性

属性 Type 必須 説明
SequenceNumber
xs:positiveInteger
いいえ
Group が親要素である場合にのみ有効です。
SequenceNumberGroup 要素内で一意である必要があります。 SequenceNumber の値は Group 要素ごとに増加する必要がありますが、シーケンシャルである必要はありません。

(xs:positiveInteger)
1000 から 59999 までの正の整数値 (両端を含む)。

子要素

要素 説明
Button
1 回以上発生する可能性がある

CheckBox
1 回以上発生する可能性がある

ComboBox
1 回以上発生する可能性がある

ControlSizeDefinition
1 回以上発生する可能性がある

DropDownButton
1 回以上発生する可能性がある

DropDownColorPicker
1 回以上発生する可能性がある

DropDownGallery
1 回以上発生する可能性がある

FontControl
最大で 1 回発生する可能性があります

InRibbonGallery
1 回以上発生する可能性がある

Spinner
1 回以上発生する可能性がある

SplitButton
1 回以上発生する可能性がある

SplitButtonGallery
1 回以上発生する可能性がある

ToggleButton
1 回以上発生する可能性がある

親要素

要素
ControlGroup
グループ
GroupSizeDefinition

注釈

省略可能。

Group 要素または ControlGroup 要素ごとに 1 回以上発生する可能性があります。

シーケンス番号が指定されていない場合、要素はリボン マークアップで指定された順序でレンダリングされます。

Group または ControlGroup が親要素の場合、ControlGroup は、ButtonCheckBoxComboBoxDropDownButtonDropDownColorPickerDropDownGalleryFontControlInRibbonGalleryスピナーSplitButton、SplitButton、SplitButtonToggleButton のいずれかの子要素に制限されます。

それ以外の場合、 Row または GroupSizeDefinition が親の場合、 Group は可能な子要素 ControlSizeDefinition に制限されます。

次のコード例では、さまざまな Group 要素を含むカスタム 4 ボタン SizeDefinition レイアウト テンプレートの基本的なマークアップを示します。

<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>

要素情報

  • サポートされている最小システム: Windows 7
  • 空にできます: いいえ

こちらもご覧ください

サイズ定義とスケーリング ポリシーを使用したリボンのカスタマイズ