Table of Contents

Class Animation

Namespace
Avalonia.Animation
Assembly
Avalonia.Base.dll

Tracks the progress of an animation.

public sealed class Animation : AvaloniaObject, INotifyPropertyChanged, IAnimation
Inheritance
Animation
Implements
Inherited Members
Extension Methods

Constructors

Animation()

public Animation()

Fields

DelayBetweenIterationsProperty

Defines the DelayBetweenIterations property.

public static readonly DirectProperty<Animation, TimeSpan> DelayBetweenIterationsProperty

Field Value

DirectProperty<Animation, TimeSpan>

DelayProperty

Defines the Delay property.

public static readonly DirectProperty<Animation, TimeSpan> DelayProperty

Field Value

DirectProperty<Animation, TimeSpan>

DurationProperty

Defines the Duration property.

public static readonly DirectProperty<Animation, TimeSpan> DurationProperty

Field Value

DirectProperty<Animation, TimeSpan>

EasingProperty

Defines the Easing property.

public static readonly DirectProperty<Animation, Easing> EasingProperty

Field Value

DirectProperty<Animation, Easing>

FillModeProperty

Defines the FillMode property.

public static readonly DirectProperty<Animation, FillMode> FillModeProperty

Field Value

DirectProperty<Animation, FillMode>

IterationCountProperty

Defines the IterationCount property.

public static readonly DirectProperty<Animation, IterationCount> IterationCountProperty

Field Value

DirectProperty<Animation, IterationCount>

PlaybackDirectionProperty

Defines the PlaybackDirection property.

public static readonly DirectProperty<Animation, PlaybackDirection> PlaybackDirectionProperty

Field Value

DirectProperty<Animation, PlaybackDirection>

SpeedRatioProperty

Defines the SpeedRatio property.

public static readonly DirectProperty<Animation, double> SpeedRatioProperty

Field Value

DirectProperty<Animation, double>

Properties

Children

Gets the children of the Animation.

[Content]
public KeyFrames Children { get; }

Property Value

KeyFrames

Delay

Gets or sets the initial delay time for this animation.

public TimeSpan Delay { get; set; }

Property Value

TimeSpan

DelayBetweenIterations

Gets or sets the delay time in between iterations.

public TimeSpan DelayBetweenIterations { get; set; }

Property Value

TimeSpan

Duration

Gets or sets the active time of this animation.

public TimeSpan Duration { get; set; }

Property Value

TimeSpan

Easing

Gets or sets the easing function to be used for this animation.

public Easing Easing { get; set; }

Property Value

Easing

FillMode

Gets or sets the value fill mode for this animation.

public FillMode FillMode { get; set; }

Property Value

FillMode

IterationCount

Gets or sets the repeat count for this animation.

public IterationCount IterationCount { get; set; }

Property Value

IterationCount

PlaybackDirection

Gets or sets the playback direction for this animation.

public PlaybackDirection PlaybackDirection { get; set; }

Property Value

PlaybackDirection

SpeedRatio

Gets or sets the speed multiple for this animation.

public double SpeedRatio { get; set; }

Property Value

double

Methods

RegisterCustomAnimator<T, TAnimator>()

public static void RegisterCustomAnimator<T, TAnimator>() where TAnimator : InterpolatingAnimator<T>, new()

Type Parameters

T
TAnimator

RunAsync(Animatable, CancellationToken)

public Task RunAsync(Animatable control, CancellationToken cancellationToken = default)

Parameters

control Animatable
cancellationToken CancellationToken

Returns

Task

SetAnimator(IAnimationSetter, CustomAnimatorBase)

Sets the value of the Animator attached property for a setter.

[Obsolete("CustomAnimatorBase will be removed before 11.0, use InterpolatingAnimator<T>", true)]
public static void SetAnimator(IAnimationSetter setter, CustomAnimatorBase value)

Parameters

setter IAnimationSetter

The animation setter.

value CustomAnimatorBase

The property animator value.

SetAnimator(IAnimationSetter, ICustomAnimator)

Sets the value of the Animator attached property for a setter.

public static void SetAnimator(IAnimationSetter setter, ICustomAnimator value)

Parameters

setter IAnimationSetter

The animation setter.

value ICustomAnimator

The property animator value.