InteractionSourceMode Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the various definitions for how a VisualInteractionSource will process interactions. Options available for the enumeration are Disabled , EnabledWithInertia and EnabledWithoutInertia . The InteractionSourceMode can be used to define the behavior for the X, Y and Scale Axis of a VisualInteractionSource.
public enum class InteractionSourceMode
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
enum class InteractionSourceMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
public enum InteractionSourceMode
Public Enum InteractionSourceMode
- Inheritance
-
InteractionSourceMode
- Attributes
Windows requirements
Device family |
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v3.0)
|
Fields
Name | Value | Description |
---|---|---|
Disabled | 0 | Interaction is disabled. |
EnabledWithInertia | 1 | Interaction is enabled with inertia. |
EnabledWithoutInertia | 2 | Interaction is enabled without inertia. |
Examples
void SetupInteractionSource(ContainerVisual container, InteractionTracker tracker)
{
// Setup the Interaction Source
_interactionSource = VisualInteractionSource.Create(container);
// Define the Source Modes for X, Y, and Scale.
_interactionSource.PositionXSourceMode = InteractionSourceMode.EnabledWithInertia;
_interactionSource.PositionYSourceMode = InteractionSourceMode.EnabledWithoutInertia;
_interactionSource.ScaleSourceMode = InteractionSourceMode.Disabled;
// Attach the VisualInteractionSource to InteractionTracker
tracker.InteractionSources.Add(_interactionSource);
}