Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 1.97 KB

interactiontrackerinertiastateenteredargs.md

File metadata and controls

53 lines (34 loc) · 1.97 KB
-api-id -api-type
T:Windows.UI.Composition.Interactions.InteractionTrackerInertiaStateEnteredArgs
winrt class

Windows.UI.Composition.Interactions.InteractionTrackerInertiaStateEnteredArgs

-description

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.

-remarks

Version history

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

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

-see-also