Partager via


TranslateZoomRotateBehavior

JJ170765.bf9c77b1-ba7a-4f3b-8380-d05728d208d1(fr-fr,VS.110).png

You can use the TranslateZoomRotateBehavior behavior to manipulate an element that the behavior has been applied to when you are using a touch-enabled screen running Windows 7.

To add a TranslateZoomRotateBehavior

  1. In the Assets panel, click Behaviors, and then drag TranslateZoomRotateBehavior onto the object that you want to apply the behavior to. The Common Properties category appears in the Properties panel.

  2. In the Common Properties category in the Properties panel, in the SupportedGestures drop-down list, select one of the following:

    • None   Applies the behavior to the element, but specifies that none of the gestures be supported.

    • TranslateX   Specifies that you want to constrain the movement to a horizontal gesture.

    • TranslateY   Specifies that you want to constrain the movement to a vertical gesture.

    • Translate   Specifies unconstrained movement, which means that you do not want to constrain the movement to either a horizontal or a vertical gesture.

    • Rotate   Specifies that you want to be able to rotate the object.

    • Scale   Specifies that you want to be able to make the object larger or smaller.

    • All   Specifies that you want to support all the gestures on the list.

    TranslateZoomRotateBehavior

  3. Select or clear the ConstrainToParentBounds option. When selected, ConstrainToParentBounds constrains the movement of the element to within the boundaries of the parent container.

  4. If you selected All or Scale in the SupportedGestures list, you can use MaximumScale and MinimumScale to constrain how large or how small a size to which you can scale the object.

  5. When you change the position or the rotation of the object, the object is animated in the transition to the new values. RotationalFriction and TranslateFriction specify the rate of change when the object is in rotation or in translation. The higher the value is, the more sudden the transition is.