次の方法で共有


ScalingPolicy 要素

スケーリングの仕様のコンテナーを表します。

使用法

<ScalingPolicy>
  child elements
</ScalingPolicy>

属性

属性はありません。

子要素

要素 説明
スケール
1 回以上発生する可能性がある

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

親要素

要素
Tab.ScalingPolicy

解説

必須。

Tab.ScalingPolicy ごとに 1 回実行する必要があります。

ScalingPolicy 要素には、リボンのサイズ変更時に 1 つ以上の Group 要素のアダプティブ レイアウト設定を指定する ScalingPolicy.IdealSizes および Scale 宣言のマニフェストが含まれています。

Scale 宣言の一覧は、Group 要素に関連付けられている SizeDefinition の有効なサイズ (Large、Medium、Small、Popup) の降順である必要があります。

Note

96 ドット/インチ (dpi) で幅 300 ピクセルにサイズ変更すると、リボンがスクロール バーなしでレンダリングできるように、適切なスケーリング ポリシーの詳細を指定することを強くお勧めします。

次の例では、リボン SizeDefinition テンプレートのアダプティブ レイアウト機能を使用して、グループ内のコントロールの外観をカスタマイズする方法を示します。

この例の ScalingPolicy マニフェストでは、[ホーム] タブの 4 つのコントロール グループごとに 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
  • 空の場合: いいえ

関連項目

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