다음을 통해 공유


InteractionSourceMode 열거형

정의

VisualInteractionSource가 상호 작용을 처리하는 방법에 대한 다양한 정의를 제공합니다. 열거형에 사용할 수 있는 옵션은 Disabled , EnabledWithInertiaEnabledWithoutInertia 입니다. InteractionSourceMode를 사용하여 VisualInteractionSource의 X, Y 및 배율 축에 대한 동작을 정의할 수 있습니다.

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
상속
InteractionSourceMode
특성

필드

Name Description
Disabled 0

상호 작용을 사용할 수 없습니다.

EnabledWithInertia 1

관성에서 상호 작용을 사용하도록 설정됩니다.

EnabledWithoutInertia 2

상호 작용은 관성 없이 활성화됩니다.

예제

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

적용 대상