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 ref class InteractionTrackerInertiaStateEnteredArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.LiftedContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class InteractionTrackerInertiaStateEnteredArgs final
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
class InteractionTrackerInertiaStateEnteredArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.LiftedContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class InteractionTrackerInertiaStateEnteredArgs
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
public sealed class InteractionTrackerInertiaStateEnteredArgs
Public NotInheritable Class InteractionTrackerInertiaStateEnteredArgs
Inheritance
Object Platform::Object IInspectable InteractionTrackerInertiaStateEnteredArgs
Attributes

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

Properties

IsFromBinding

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

IsInertiaFromImpulse

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

ModifiedRestingPosition

The InteractionTracker's resting position when inertia completes after InteractionTrackerInertiaModifiers 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

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

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

The InteractionTracker's resting scale when inertia completes, without accounting for InteractionTrackerInertiaModifiers 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 InteractionTrackerInertiaModifiers and Min/Max boundaries.

PositionVelocityInPixelsPerSecond

The velocity of InteractionTracker's position.

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

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

The velocity of InteractionTracker's scale.

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

Applies to