InteractionTrackerInertiaStateEnteredArgs InteractionTrackerInertiaStateEnteredArgs InteractionTrackerInertiaStateEnteredArgs InteractionTrackerInertiaStateEnteredArgs Class

Definition

Arguments for the IInteractionTrackerOwner.InertiaStateEntered callback.

The InteractionTrackerOwner.InertiaStateEntered class defines the accessible and up-to-date property values when InteractionTracker enters the inertia state. If registered for the InertiaStateEntered event, values of this object's properties represent the results calculated by the system at the beginning of the inertia state. Using the modified and natural resting positions helps enables scenarios such as scrolling virtualization.

public : sealed class InteractionTrackerInertiaStateEnteredArgs
struct winrt::Windows::UI::Composition::Interactions::InteractionTrackerInertiaStateEnteredArgs
public sealed class InteractionTrackerInertiaStateEnteredArgs
Public NotInheritable Class InteractionTrackerInertiaStateEnteredArgs
Attributes

Windows 10 requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Examples


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

Remarks

Version history

Windows version SDK version Value added
1809 17763 IsInertiaFromImpulse
1903 18362 IsFromBinding

Properties

IsFromBinding IsFromBinding IsFromBinding IsFromBinding

Gets a value that indicates whether this state was entered through interaction with a tracker that this one is bound to.

IsInertiaFromImpulse IsInertiaFromImpulse IsInertiaFromImpulse IsInertiaFromImpulse

Gets a value that indicates whether the inertia is the result of an impulse.

ModifiedRestingPosition ModifiedRestingPosition ModifiedRestingPosition ModifiedRestingPosition

The InteractionTracker 's resting position when inertia completes after InteractionTrackerInertiaModifier s and boundaries have been applied.

The ModifiedRestingPosition property represents the systems calculation of where the final resting position of InteractionTracker will be based on an interaction. Unlike the NaturalRestingPosition, ModifiedRestingPosition will be calculated based on other factors that affect the motion of InteractionTracker such as InertiaModifiers and Min/Max boundaries.

ModifiedRestingScale ModifiedRestingScale ModifiedRestingScale ModifiedRestingScale

The InteractionTracker 's resting scale when inertia completes, after InteractionTrackerInertiaModifiers and boundaries have been applied.

The ModifiedRestingScale property represents the systems calculation of where the final resting scale position of InteractionTracker will be based on an interaction. Unlike the NaturalRestingScale, ModifiedRestingScale will be calculated based on other factors that affect the motion of InteractionTracker such as InertiaModifiers and Min/Max boundaries.

NaturalRestingPosition NaturalRestingPosition NaturalRestingPosition NaturalRestingPosition

The InteractionTracker 's resting position when inertia completes, without any modifiers or boundaries applied.

The NaturalRestingPosition property represents the system’s calculation of InteractionTracker ’s final natural resting position based on an interaction. Unlike the ModifiedRestingPosition, NaturalRestingPosition will be calculated without any other factors that impact InteractionTracker ’s motion such as InertiaModifiers and Min/Max boundaries.

NaturalRestingScale NaturalRestingScale NaturalRestingScale NaturalRestingScale

The InteractionTracker 's resting scale when inertia completes, without accounting for InteractionTrackerInertiaModifier s or boundaries.

The NaturalRestingScale property represents the system’s calculation of InteractionTracker ’s final natural resting scale position based on an interaction. Unlike the ModifiedRestingScale, NaturalRestingScale will be calculated without any other factors that impact InteractionTracker ’s motion such as InteractionTrackerInertiaModifier s and Min/Max boundaries.

PositionVelocityInPixelsPerSecond PositionVelocityInPixelsPerSecond PositionVelocityInPixelsPerSecond PositionVelocityInPixelsPerSecond

The velocity of InteractionTracker 's position.

The PositionVelocityInPixelsPerSecond property represents the position velocity of InteractionTracker when it has entered the Inertia state.

RequestId RequestId RequestId RequestId

The ID of the request that triggered the callback. Represents the ID of the request that caused InteractionTracker to enter the Inertia State (the InertiaStateEntered callback was triggered). Note that the RequestID property will be incremented each time a request tries to change the state of InteractionTracker.

ScaleVelocityInPercentPerSecond ScaleVelocityInPercentPerSecond ScaleVelocityInPercentPerSecond ScaleVelocityInPercentPerSecond

The velocity of InteractionTracker 's scale.

The ScaleVelocityInPercentPerSecond property represents the scale velocity of InteractionTracker when it has entered the Inertia state.