Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ScalingPolicy

ScalingPolicy element

Represents a container for scaling specifications.

Usage

<ScalingPolicy>
  child elements
</ScalingPolicy>

Attributes

There are no attributes.

Child elements

ElementDescription

Scale

May occur one or more times

ScalingPolicy.IdealSizes

May occur at most once

Parent elements

Element

Tab.ScalingPolicy

Remarks

Required.

Must occur once for each Tab.ScalingPolicy.

The ScalingPolicy element contains a manifest of ScalingPolicy.IdealSizes and Scale declarations that specify adaptive layout preferences for one or more Group elements when the Ribbon is resized.

The list of Scale declarations must be in descending order of valid sizes (Large, Medium, Small, Popup) for the SizeDefinition associated with the Group element.

Note  It is highly recommended that adequate scaling policy detail be specified such that a Ribbon is able to render without scroll bars when resized to a width of 300 pixels at 96 dots per inch (dpi).
 

Examples

The following example demonstrates how the appearance of controls in a Group can be customized through the adaptive layout functionality of Ribbon SizeDefinition templates.

The ScalingPolicy manifest in this example specifies a ScalingPolicy.IdealSizes SizeDefinition preference for each of four groups of controls on a Home tab. In addition, Scale elements are specified to influence the collapsing behavior, in descending size order, of each group.


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

Element information

Minimum supported system

Windows 7
Can be emptyNo

See also

Customizing a Ribbon Through Size Definitions and Scaling Policies

 

 

Community Additions

ADD
Show:
© 2015 Microsoft