Skip to main content

CrossFade Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia

Defines a cross-fade animation between two Avalonia.Visuals.

public class CrossFade

Inheritance: object -> CrossFade

Constructors​

NameDescription
CrossFade (2 overloads)Initializes a new instance of the Avalonia.Animation.CrossFade class.

CrossFade overloads​

CrossFade Constructor​

Initializes a new instance of the Avalonia.Animation.CrossFade class.

public CrossFade()

CrossFade Constructor​

Initializes a new instance of the Avalonia.Animation.CrossFade class.

public CrossFade(TimeSpan duration)
Parameters​

duration TimeSpan

The duration of the animation.

Methods​

NameDescription
ResetResets any visual state applied to the given visual by this transition.
StartNo summary available.
UpdateNo summary available.

Reset Method​

Resets any visual state applied to the given visual by this transition.

public void Reset(Avalonia.Visual visual)

Parameters​

visual Avalonia.Visual

The visual to reset.

Start Method​

public System.Threading.Tasks.Task Start(Avalonia.Visual from, Avalonia.Visual to, System.Threading.CancellationToken cancellationToken)

Parameters​

from Avalonia.Visual

to Avalonia.Visual

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task

Update Method​

public void Update(double progress, Avalonia.Visual from, Avalonia.Visual to, bool forward, double pageLength, System.Collections.Generic.IReadOnlyList<Avalonia.Animation.PageTransitionItem> visibleItems)

Parameters​

progress double

from Avalonia.Visual

to Avalonia.Visual

forward bool

pageLength double

visibleItems System.Collections.Generic.IReadOnlyList<Avalonia.Animation.PageTransitionItem>

Properties​

NameDescription
DurationGets the duration of the animation.
FadeInEasingGets or sets element entrance easing.
FadeOutEasingGets or sets element exit easing.
FillModeGets or sets the fill mode applied to both fade animations. Defaults to Avalonia.Animation.FillMode.Forward.

Duration Property​

Gets the duration of the animation.

public TimeSpan Duration { get; set; }

FadeInEasing Property​

Gets or sets element entrance easing.

public Avalonia.Animation.Easings.Easing FadeInEasing { get; set; }

FadeOutEasing Property​

Gets or sets element exit easing.

public Avalonia.Animation.Easings.Easing FadeOutEasing { get; set; }

FillMode Property​

Gets or sets the fill mode applied to both fade animations. Defaults to Avalonia.Animation.FillMode.Forward.

public Avalonia.Animation.FillMode FillMode { get; set; }