Share via


ScalingPolicy.IdealSizes 屬性

表示根據功能區大小,為慣用 SizeDefinition 範本調整規格的容器。

使用方式

<ScalingPolicy.IdealSizes>
  child elements
</ScalingPolicy.IdealSizes>

屬性

沒有屬性。

子元素

元素 描述
調整
可能發生一或多次

父元素

元素
ScalingPolicy

備註

選擇性。

每個 ScalingPolicy最多可能會發生一次。

如果已定義ScalePolicy.IdealSizes,則Tab元素中每個Group元素的Scale專案必須存在。

ScalingPolicy.IdealSizes是控制項群組慣用的 SizeDefinition版面配置。

範例

下列範例示範如何透過功能區SizeDefinition範本的調適型配置功能來自訂群組中的控制面板。

此範例中的ScalingPolicy資訊清單會針對 [常用] 索引標籤上的四組控制項,指定ScalingPolicy.IdealSizesSizeDefinition喜好設定。此外,會指定Scale元素來影響每個群組的遞減大小順序來影響折迭行為。

<Tab CommandName="Home">
  <Tab.ScalingPolicy>
    <ScalingPolicy>
      <ScalingPolicy.IdealSizes>
        <Scale Group="GroupClipboard" Size="Medium"/>
        <Scale Group="GroupView" Size="Large"/>
        <Scale Group="GroupFont" Size="Large"/>
        <Scale Group="GroupParagraph" Size="Large"/>
      </ScalingPolicy.IdealSizes>
      <Scale Group="GroupClipboard" Size="Small"/>
      <Scale Group="GroupClipboard" Size="Popup"/>
      <Scale Group="GroupFont" Size="Medium"/>
      <Scale Group="GroupParagraph" Size="Medium"/>
      <!-- 
        GroupView group is associated with the OneButton SizeDefinition.
        Since this template is constrained to one size (Large) there
        is no need to declare further scaling preferences.
      -->
    </ScalingPolicy>
  </Tab.ScalingPolicy>

  <Group CommandName="GroupClipboard" SizeDefinition="FourButtons">
    <Button CommandName="Paste"/>
    <Button CommandName="Cut"/>
    <Button CommandName="Copy"/>
    <Button CommandName="SelectAll"/>
  </Group>

  <Group CommandName="GroupFont"  ApplicationModes="1">
    <FontControl CommandName="Font" FontType="FontWithColor" />
  </Group>

  <Group CommandName="GroupParagraph"  ApplicationModes="1" SizeDefinition="ButtonGroups">
    <ControlGroup>
      <ControlGroup>
        <ToggleButton CommandName="Numbered" />
        <ToggleButton CommandName="Bulleted" />
      </ControlGroup>
    </ControlGroup>
    <ControlGroup>
      <ControlGroup>
        <ToggleButton CommandName="LeftJustify" />
        <ToggleButton CommandName="CenterJustify" />
        <ToggleButton CommandName="RightJustify" />
      </ControlGroup>
      <ControlGroup/>
      <ControlGroup>
        <Button CommandName="Outdent" />
        <Button CommandName="Indent" />
      </ControlGroup>
    </ControlGroup>
  </Group>

  <Group CommandName="GroupView" SizeDefinition="OneButton" >
    <ToggleButton CommandName="ViewSource"/>
  </Group>

</Tab>

規格需求

需求
最低支援的用戶端
Windows 7 [僅限傳統型應用程式]
最低支援的伺服器
Windows Server 2008 R2 [僅限桌面應用程式]

另請參閱

透過大小定義和調整原則自訂功能區