Skip to main content
Version: 11.0.x

Animation Settings

This section describes how Animation playback can be customized.

Easing Functions

Easing functions describe how quickly an animated property changes from its starting value into its ending value across the animation time. Avalonia.Animation.Easings contains the following easings:

Default
LinearEasing
Ease-InEase-OutEase-In-Out
SineEaseIn
SineEaseOut
SineEaseInOut
QuadraticEaseIn
QuadraticEaseOut
QuadraticEaseInOut
CubicEaseIn
CubicEaseOut
CubicEaseInOut
QuarticEaseIn
QuarticEaseOut
QuarticEaseInOut
QuinticEaseIn
QuinticEaseOut
QuinticEaseInOut
ExponentialEaseIn
ExponentialEaseOut
ExponentialEaseInOut
CircularEaseIn
CircularEaseOut
CircularEaseInOut
BackEaseIn
BackEaseOut
BackEaseInInOut
ElasticEaseIn
ElasticEaseOut
ElasticEaseInOut
BounceEaseIn
BounceEaseOut
BounceEaseInOut

Additionally, you can provide your own easing by deriving from Easing or by providing parameters to SplineEasing or SpringEasing.

FillModes

The FillMode attribute of an Animation defines how the animated property persists after an animation completes and during delays in-between runs.

The following table describes the supported behaviors:

ValueDescription
NoneValue will not persist after animation nor the first value will be applied when the animation is delayed.
ForwardThe last interpolated value will be persisted to the target property.
BackwardThe first interpolated value will be displayed on animation delay.
BothBoth Forward and Backward behaviors will be applied.

PlaybackDirection

PlaybackDirection defines how the Animation will be played. The following table describes the possible settings:

ValueDescription
NormalThe animation is played normally.
ReverseThe animation is played in reverse direction.
AlternateThe animation is played forwards first, then backwards.
AlternateReverseThe animation is played backwards first, then forwards.

IterationCount

The IterationCount on an Animation element sets how many times it is to be replayed. There are two formats for this setting:

ValueDescription
N(N is an integer) - play N times. N can be zero.
InfiniteRepeats forever