ControlSizeDefinition 要素

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

使用

<ControlSizeDefinition
  ImageSize = "xs:string"
  IsLabelVisible = "Boolean"
  IsImageVisible = "Boolean"
  IsPopup = "Boolean"
  ControlName = "xs:positiveInteger or xs:string"/>

属性

属性 Type 必須 説明
ControlName
xs:positiveInteger または xs:string
いいえ
(xs:positiveInteger または xs:string)
文字列、2 ~ 59999 の整数値、または 0x2 から 0xea5f までの 16 進数の値 (両端を含む)。
値は、リボン XML ドキュメント内で一意である必要があります。
最大長: 100 文字。
ImageSize
xs:string
いいえ
次のいずれかの値に制限されます。

(大)
(小)
既定値。
IsImageVisible
ブール型
いいえ
次のいずれかの値に制限されます (0 と 1 は無効です)。

(true)
既定値。
(false)
IsLabelVisible
ブール型
いいえ
次のいずれかの値に制限されます (0 と 1 は無効です)。

(true)
既定値。
(false)
IsPopup
ブール型
いいえ
次のいずれかの値に制限されます (0 と 1 は無効です)。

(true)
(false)

子要素

子要素はありません。

親要素

要素
ControlGroup
GroupSizeDefinition

注釈

省略可能。

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

次のコード例では、さまざまな ControlSizeDefinition 要素を含むカスタム 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
  • 空の場合: はい

こちらもご覧ください

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