Skip to content

TranslateZoomRotateBehavior

branh edited this page Dec 4, 2018 · 1 revision

TranslateZoomRotateBehavior allows traditional touch interaction. On a non-touch device, it functions similarly to MouseDragElementBehavior.

The responsiveness of an object to touch manipulation with this behavior can be adjusted by setting TranslateFriction or RotationalFriction. Interaction can also be limited by setting the ConstrainToParentBounds property or specifying a MinimumScale or MaximumScale.

The types of interactions enabled by this behavior can be restricted by setting the SupportedGestures.

ManipulationModes enumeration

Member name Description
None No manipulation allowed.
TranslateX Object may move horizontally in response to manipulation.
TranslateY Object may move vertically in response to manipulation.
Translate Object may move horizontally or vertically in response to manipulation.
Rotate Object may be rotated using touch manipulation.
Scale Size of object may be changed by manipulation.
All Object may be translated, rotated, and scaled in size via manipulation.

Sample Code

Xaml

<Rectangle>
  <Behaviors:Interaction.Behaviors>
    <Behaviors:TranslateZoomRotateBehavior/>
  </Behaviors:Interaction.Behaviors>
</Rectangle>