Delen via


IInteractionTrackerOwner Interface

Definition

Contains callbacks that will be triggered by InteractionTracker events.

Implementing this interface enables receiving callbacks regarding the state and values of the InteractionTracker, as well as whether requested updates to the InteractionTracker ’s properties are honored.

public interface class IInteractionTrackerOwner
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.Guid(3677260531, 19947, 20051, 178, 156, 176, 108, 159, 150, 214, 81)]
struct IInteractionTrackerOwner
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.Guid(3677260531, 19947, 20051, 178, 156, 176, 108, 159, 150, 214, 81)]
public interface IInteractionTrackerOwner
Public Interface IInteractionTrackerOwner
Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Examples

class InteractionBehavior : Behavior<UIElement>, IInteractionTrackerOwner
{
  public void CustomAnimationStateEntered(InteractionTracker sender, InteractionTrackerCustomAnimationStateEnteredArgs args)
  {
    //Logic to run when InteractionTracker enters CustomAnimation 
  }

  public void IdleStateEntered(InteractionTracker sender, InteractionTrackerIdleStateEnteredArgs args)
  {
    //Logic to run when InteractionTracker enters Idle
  }

  public void InertiaStateEntered(InteractionTracker sender, InteractionTrackerInertiaStateEnteredArgs args)
  {
    //Logic to run when InteractionTracker enters Inertia
  }

  public void InteractingStateEntered(InteractionTracker sender, InteractionTrackerInteractingStateEnteredArgs args)
  {
    //Logic to run when InteractionTracker enters Interacting
  }

  public void RequestIgnored(InteractionTracker sender, InteractionTrackerRequestIgnoredArgs args)
  {
    //Logic to run when a request to update position or scale is ignored
  }

  public void ValuesChanged(InteractionTracker sender, InteractionTrackerValuesChangedArgs args)
  {

    //Logic to run when position or scale change
  }
}

Remarks

Implementing IInteractionTrackerOwner is required if the application needs to have updates on the state or values of the InteractionTracker. Due to the asynchronous nature of this model, these callbacks are the best way to update application logic. To learn more about the InteractionTracker states and transitions, see InteractionTracker.

An InteractionTracker can be created with or without an owner. Creating the InteractionTracker with an owner is required for registering for callbacks. If these callbacks are not important for application state, then creating an InteractionTracker without an owner is appropriate.

Creating an InteractionTracker with an owner also requires appropriately disposing the InteractionTracker when appropriate.

Methods

CustomAnimationStateEntered(InteractionTracker, InteractionTrackerCustomAnimationStateEnteredArgs)

Callback triggered when an InteractionTracker enters the custom animation state.

IdleStateEntered(InteractionTracker, InteractionTrackerIdleStateEnteredArgs)

Callback triggered when an InteractionTracker enters the idle state.

InertiaStateEntered(InteractionTracker, InteractionTrackerInertiaStateEnteredArgs)

Callback triggered when an InteractionTracker enters the inertia state.

InteractingStateEntered(InteractionTracker, InteractionTrackerInteractingStateEnteredArgs)

Callback that is triggered when an InteractionTracker enters the interaction state.

RequestIgnored(InteractionTracker, InteractionTrackerRequestIgnoredArgs)

Callback that is triggered when the InteractionTracker has ignored a request.

ValuesChanged(InteractionTracker, InteractionTrackerValuesChangedArgs)

Callback that is triggered when the InteractionTracker's output values have changed.

Applies to