InteractionSourceMode Enum

Definisi

Menyediakan berbagai definisi tentang bagaimana VisualInteractionSource akan memproses interaksi. Opsi yang tersedia untuk enumerasi dinonaktifkan , EnabledWithInertia dan EnabledWithoutInertia . InteractionSourceMode dapat digunakan untuk menentukan perilaku untuk Sumbu X, Y, dan Skala 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
Warisan
InteractionSourceMode
Atribut

Persyaratan Windows

Rangkaian perangkat
Windows 10 Anniversary Edition (diperkenalkan dalam 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v3.0)

Bidang

Disabled 0

Interaksi dinonaktifkan.

EnabledWithInertia 1

Interaksi diaktifkan dengan inertia.

EnabledWithoutInertia 2

Interaksi diaktifkan tanpa inertia.

Contoh

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

Berlaku untuk