ControlSizeDefinition 元素
代表自訂範本中控制項群組的版面配置樣式。
使用方式
<ControlSizeDefinition
ImageSize = "xs:string"
IsLabelVisible = "Boolean"
IsImageVisible = "Boolean"
IsPopup = "Boolean"
ControlName = "xs:positiveInteger or xs:string"/>
屬性
屬性 | 類型 | 必要 | Description |
---|---|---|---|
ControlName |
xs:positiveInteger 或 xs:string |
No |
值在功能區 XML 檔中必須是唯一的。 最大長度:100 個字元。 |
ImageSize |
xs:string |
No |
限制為下列其中一個值: |
IsImageVisible |
Boolean |
No |
限制為下列其中一個值, (0 和 1 無效) : |
IsLabelVisible |
Boolean |
No |
限制為下列其中一個值, (0 和 1 無效) : |
IsPopup |
Boolean |
No |
限制為下列其中一個值, (0 和 1 無效) : |
子元素
沒有子項目。
父元素
元素 |
---|
ControlGroup |
GroupSizeDefinition |
行 |
備註
選擇性。
每個 ControlGroup、 Row或 SizeDefinition 元素可能會發生一或多次。
範例
下列程式碼範例示範具有各種ControlSizeDefinition元素之自訂四按鈕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
- 可以是空的:是