次の方法で共有


InteractionSourceMode 列挙型

定義

VisualInteractionSource が対話を処理する方法に関するさまざまな定義を提供します。 列挙に使用できるオプションは 、DisabledEnabledWithInertiaEnabledWithoutInertia です。 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
属性

フィールド

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

適用対象