InteractionSourceMode Enumeration

Definition

Stellt die verschiedenen Definitionen bereit, wie eine VisualInteractionSource Interaktionen verarbeitet. Für die Enumeration verfügbare Optionen sind "Disabled", "EnabledWithInertia" und "EnabledWithoutInertia". Der InteractionSourceMode kann verwendet werden, um das Verhalten für die X-, Y- und Skalierungsachse einer VisualInteractionSource zu definieren.

public enum class InteractionSourceMode
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.LiftedContract, 65536)]
enum class InteractionSourceMode
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
enum class InteractionSourceMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.LiftedContract), 65536)]
public enum InteractionSourceMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
public enum InteractionSourceMode
var value = Microsoft.UI.Composition.Interactions.InteractionSourceMode.disabled
Public Enum InteractionSourceMode
Vererbung
InteractionSourceMode
Attribute

Felder

Name Wert Beschreibung
Disabled 0

Die Interaktion ist deaktiviert.

EnabledWithInertia 1

Die Interaktion ist mit Unträgheit aktiviert.

EnabledWithoutInertia 2

Die Interaktion ist ohne Unträgheit aktiviert.

Beispiele

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

Gilt für: