UIElement.ManipulationMode property

Expand Minimize
0 out of 4 rated this helpful - Rate this topic

Gets or sets the ManipulationModes value used for UIElement behavior and interaction with gestures.

Syntax


public ManipulationModes ManipulationMode { get; set; }


<uiElement ManipulationMode="All"/>
-or-
<uiElement ManipulationMode="None"/>
-or-
<uiElement ManipulationMode="singleManipulationModesMemberName"/>
-or-
<uiElement ManipulationMode="relatedManipulationModesNames"/>


XAML Values

singleManipulationModesMemberName

One of the named constants of the ManipulationModes enumeration that constrain the manipulation to a single behavior, for example TranslateX.

relatedManipulationModesNames

Two or more ManipulationModes enumeration constant names separated by commas, for example TranslateX,TranslateY. See "Specifying related manipulation modes" section.

Property value

Type: ManipulationModes

A value of the enumeration. The default is typically System, but this can vary on specific controls and elements. See Remarks.

Remarks

You must set the ManipulationMode to a value other than System or None if you want to handle manipulation events such as ManipulationStarted from UI elements in your app code. For more info on manipulations, see Quickstart: Touch input.

The typical default value of ManipulationMode is System rather than None. When the value is System, manipulations that originate from the element can be handled by the Windows Runtime infrastructure, which is based on the Direct ManipulationAPI. For example, ScrollViewer handles user manipulations in its control logic and processes them as scrolling actions for the control. The System value also enables personality animations that respond to manipulation events.

Slider and ToggleSwitch have default templates that set the ManipulationMode value to None, so None will be the default value you see at design time.

Specifying related manipulation modes

You can specify more than one of the flagwise ManipulationModes values as the value of the ManipulationMode property, either in code or in XAML using the comma syntax shown. For example, you can combine TranslateX, TranslateY, Rotate, and Scale, or any combination of these. However, not all combinations are valid. Validity is enforced only once ManipulationModes is used by a specific control, so issues with setting an invalid combination of ManipulationModes might not appear until run-time. Don't combine Translate* values with TranslateRails* values, as these are treated as exclusive value, and don't combine the inertial values with the non-inertial values. The All value isn't the true additive value of all the flags, so All doesn't necessarily indicate that the combination of all the values is valid either, or that any specific value is set.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

UIElement
ManipulationStarted
ManipulationDelta
ManipulationCompleted
ManipulationModes
Quickstart: Touch input
Direct Manipulation Reference

 

 

Build date: 1/31/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.