Windows.UI.Composition.Interactions Namespace

Provides functionality that enables input driven animations in the visual layer.

Equivalent WinUI namespace: Microsoft.UI.Composition.Interactions.



Allows conditional modification of the position and scale of a visual interaction source.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.CompositionConditionalValue.


A collection of interaction sources.

This is the collection of interaction sources that are associated with a given InteractionTracker. The only valid member of this collection is a VisualInteractionSource. Each VisualInteractionSource needs to have a unique hit-test (source) visual. Each VisualInteractionSource will be configured individually for the desired input to be sent to the InteractionTracker.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.CompositionInteractionSourceCollection.


Represents the configuration of a VisualInteractionSource input.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionSourceConfiguration.


Handles the logic of input that can be used as targets in ExpressionAnimations—typically to drive the motion of visuals based on input.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTracker.


Arguments for the IInteractionTrackerOwner.CustomAnimationStateEntered callback.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerCustomAnimationStateEnteredArgs.


Arguments for the IInteractionTrackerOwner.IdleStateEntered callback.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerIdleStateEnteredArgs.


Base class for inertia modifiers.

The InteractionTrackerInertiaModifier represents the base class for inertia modifiers. inertia modifiers can be thought of as ways to change the behavior for where and how InteractionTracker reaches its final resting position. Changing this behavior of InteractionTracker is commonly used when more custom motion experiences are needed such as snap points. There are two variations to how you can modify the behavior of InteractionTracker using inertia modifiers: modify its final resting position after interaction with the InteractionTrackerInertiaRestingValue class or define the equation used to calculate the actual motion and final resting position during Inertia with the InteractionTrackerInertiaMotion class. These modifiers are applied to either X Position, Y Position or Scale of InteractionTracker.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerInertiaModifier.


An ExpressionAnimation that defines motion of InteractionTracker during its inertia state.

The InteractionTrackerMotion class contains two ExpressionAnimation s representing a second derivative equation of position InteractionTracker will use to define the motion from the start to end of inertia when a particular condition is met. The InteractionTrackerMotion class is defined as two parts: The conditional statement to define when the motion will take place and the equation that describes the motion for how InteractionTracker will reach its final resting position. Utilize the InteractionTrackerInertiaMotion class when you need to define a customized motion (such as a spring motion) for InteractionTracker to use when in its inertia state.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerInertiaMotion.


A ScalarNaturalMotionAnimation that defines motion of InteractionTracker during its inertia state.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerInertiaNaturalMotion.


An ExpressionAnimation that defines the rest position after an interaction.

The InteractionTrackerInertiaRestingValue class defines two ExpressionAnimation s that calculate an explicit resting position for InteractionTracker when a particular condition is met. The InteractionTrackerInertiaRestingValue is defined as two parts: The conditional statement in which the InteractionTracker ’s specific resting location needs to be explicitly defined if true and the equation that describes a mathematical relationship that outputs the location. Utilize the InteractionTrackerInertiaRestingValue class when needing to ensure InteractionTracker lands on a specific location after an interaction occurs.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerInertiaRestingValue.


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.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerInertiaStateEnteredArgs.


Arguments for the IInteractionTrackerOwner.InteractingStateEntered callback.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerInteractingStateEnteredArgs.


Arguments for the IInteractionTrackerOwner.RequestIgnored callback.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerRequestIgnoredArgs.


Arguments for the IInteractionTrackerOwner.ValuesChanged callback.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerValuesChangedArgs.


Base class for InteractionTrackerVector2InertiaNaturalMotion.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerVector2InertiaModifier.


A Vector2NaturalMotionAnimation that defines motion of InteractionTracker during its inertia state.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.InteractionTrackerVector2InertiaNaturalMotion.


Object for configuring input to the InteractionTracker relative to a visual.

The VisualInteractionSource is designed to be used only with InteractionTracker and defines which input will be sent to the InteractionTracker to drive its state and properties. This class contains both the visual to be used for hit-testing, as well as a variety of configuration properties for which gestures and types of input will be sent to the InteractionTracker.

Equivalent WinUI class: Microsoft.UI.Composition.Interactions.VisualInteractionSource.



An object that is being tracked for interactions in the compositor.

Equivalent WinUI interface: Microsoft.UI.Composition.Interactions.ICompositionInteractionSource.


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.

Equivalent WinUI interface: Microsoft.UI.Composition.Interactions.IInteractionTrackerOwner.



Defines constants that specify which axis is bound between two interaction trackers.

Equivalent WinUI enum: Microsoft.UI.Composition.Interactions.InteractionBindingAxisModes.


Defines the chaining behavior for a VisualInteractionSource. There are three options: Always chain, never chain or auto chain (let the system choose). If chaining is enabled, when an InteractionTracker reaches its minimum or maximum bounds, it will instead send the input to the next ancestor VisualInteractionSource.

Equivalent WinUI enum: InteractionChainingMode.


Provides the various definitions for how a VisualInteractionSource will process interactions. Options available for the enumeration are Disabled , EnabledWithInertia and EnabledWithoutInertia . The InteractionSourceMode can be used to define the behavior for the X, Y and Scale Axis of a VisualInteractionSource.

Equivalent WinUI enum: InteractionSourceMode.


Defines constants that specify whether an input should be redirected to the InteractionTracker.

Equivalent WinUI enum: Microsoft.UI.Composition.Interactions.InteractionSourceRedirectionMode.


Defines constants that specify how values are clamped when the InteractionTracker position is updated.

Equivalent WinUI enum: Microsoft.UI.Composition.Interactions.InteractionTrackerClampingOption.


Defines constants that indicate whether an already running custom scale animation should be allowed to continue running.

Equivalent WinUI enum: Microsoft.UI.Composition.Interactions.InteractionTrackerPositionUpdateOption.


Indicates what input should be redirected to the InteractionTracker.

Equivalent WinUI enum: VisualInteractionSourceRedirectionMode.