InteractionTrackerInertiaStateEnteredArgs 類別

定義

IInteractionTrackerOwner.InertiaStateEntered回呼的引數。

InteractionTrackerOwner.InertiaStateEntered類別會在InteractionTracker進入慣性狀態時定義可存取且最新的屬性值。 如果註冊 慣性StateEntered 事件,此物件屬性的值代表系統在慣性狀態開始時所計算的結果。 使用修改和自然的待用位置有助於啟用捲動虛擬化等案例。

public ref class InteractionTrackerInertiaStateEnteredArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class InteractionTrackerInertiaStateEnteredArgs final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class InteractionTrackerInertiaStateEnteredArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class InteractionTrackerInertiaStateEnteredArgs
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class InteractionTrackerInertiaStateEnteredArgs
Public NotInheritable Class InteractionTrackerInertiaStateEnteredArgs
繼承
Object Platform::Object IInspectable InteractionTrackerInertiaStateEnteredArgs
屬性

Windows 需求

裝置系列
Windows 10 Anniversary Edition (已於 10.0.14393.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v3.0 引進)

範例

public void InertiaStateEntered(InteractionTracker sender, 	InteractionTrackerInertiaStateEnteredArgs args)
{
  // Natural and Modified Resting Positions and Scale
  Vector3 naturalRestPos = args.NaturalRestingPosition;
  Vector3 modifiedRestPos = (Vector3)args.ModifiedRestingPosition;
  float naturalRestScale = args.NaturalRestingScale;
  float modifiedRestScale = (float) args.ModifiedRestingScale;

  // Position and Scale velocity of InteractionTracker when entering Inertia
  Vector3 posVelocity = args.PositionVelocityInPixelsPerSecond;
  float scaleVelocity = args.ScaleVelocityInPercentPerSecond;

  // The ID for the request that triggered the callback
  int id = args.RequestId;
}

備註

版本歷程記錄

Windows 版本 SDK 版本 新增值
1809 17763 IsInertiaFromIm pulsee
1903 18362 IsFromBinding

屬性

IsFromBinding

取得值,這個值表示此狀態是否透過與此追蹤器系結的追蹤器互動來輸入。

IsInertiaFromImpulse

取得值,這個值表示慣性是否為脈衝的結果。

ModifiedRestingPosition

當慣性在InteractionTrackerInertiaModifiers 和界限套用之後完成時,InteractionTracker的靜止位置。

ModifiedRestingPosition 屬性代表 InteractionTracker 最終剩餘位置要根據互動的系統計算。 不同于 NaturalRestingPosition,ModifiedRestingPosition 會根據影響 InteractionTracker 動作的其他因素來計算,例如 InertiaModifiers 和 Min/Max 界限。

ModifiedRestingScale

當慣性完成時,InteractionTrackerInertiaModifiers 和界限套用之後, InteractionTracker的待用縮放比例。

ModifiedRestingScale 屬性代表 InteractionTracker 最終剩餘縮放位置將依據互動的系統計算。 不同于 NaturalRestingScale,ModifiedRestingScale 會根據影響 InteractionTracker 動作的其他因素計算,例如 InertiaModifiers 和 Min/Max 界限。

NaturalRestingPosition

當慣性完成時 ,InteractionTracker的靜止位置不會套用任何修飾詞或界限。

NaturalRestingPosition 屬性代表系統根據 互動計算 InteractionTracker 的最終自然靜止位置。 不同于 ModifiedRestingPosition,會計算 NaturalRestingPosition,而不會有任何影響 InteractionTracker 動作的其他因素,例如 InertiaModifiers 和 Min/Max 界限。

NaturalRestingScale

當慣性完成時 ,InteractionTracker的靜止縮放比例不會考慮 InteractionTrackerInertiaModifiers 或界限。

NaturalRestingScale 屬性代表系統根據 互動計算 InteractionTracker 的最終自然剩餘刻度位置。 與ModifiedRestingScale不同,NaturalRestingScale 將會計算,而不會有任何影響 InteractionTracker 動作的其他因素,例如InteractionTrackerInertiaModifiers 和 Min/Max 界限。

PositionVelocityInPixelsPerSecond

InteractionTracker位置的速度。

PositionVelocityInPixelsPerSecond 屬性代表 當 InteractionTracker 進入慣性狀態時的位置速度。

RequestId

觸發回呼之要求的識別碼。 表示造成 InteractionTracker 進入慣性狀態的要求識別碼, (觸發 慣性StateEntered 回呼) 。 請注意,每次要求嘗試變更 InteractionTracker 的狀態時,RequestID 屬性都會遞增。

ScaleVelocityInPercentPerSecond

InteractionTracker規模的速度。

ScaleVelocityInPercentPerSecond 屬性代表 當 InteractionTracker 進入慣性狀態時的縮放速度。

適用於