InteractionSourceMode InteractionSourceMode InteractionSourceMode InteractionSourceMode Enum

Definition

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
enum class winrt::Windows::UI::Composition::Interactions::InteractionSourceMode : int32_t
public enum InteractionSourceMode
Public Enum InteractionSourceMode
Attributes

Windows 10 requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Fields

Disabled Disabled Disabled Disabled 0

Interaction is disabled.

EnabledWithInertia EnabledWithInertia EnabledWithInertia EnabledWithInertia 1

Interaction is enabled with inertia.

EnabledWithoutInertia EnabledWithoutInertia EnabledWithoutInertia 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);
}