Skip to main content

PageSlide Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia

Transitions between two pages by sliding them horizontally or vertically.

public class PageSlide

Inheritance: object -> PageSlide

Derived types:Rotate3DTransition

Constructors​

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

PageSlide overloads​

PageSlide Constructor​

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

public PageSlide()

PageSlide Constructor​

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

public PageSlide(TimeSpan duration, Avalonia.Animation.PageSlide.SlideAxis orientation)
Parameters​

duration TimeSpan

The duration of the animation.

orientation Avalonia.Animation.PageSlide.SlideAxis

The axis on which the animation should occur

Methods​

NameDescription
ResetResets any visual state applied to the given visual by this transition.
StartStarts the animation.
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​

Starts the animation.

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

Parameters​

from Avalonia.Visual

The control that is being transitioned away from. May be null.

to Avalonia.Visual

The control that is being transitioned to. May be null.

forward bool

If the animation is bidirectional, controls the direction of the animation.

cancellationToken System.Threading.CancellationToken

Animation cancellation.

Returns​

System.Threading.Tasks.Task

A System.Threading.Tasks.Task that tracks the progress of the animation.

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.
FillModeGets or sets the fill mode applied to both slide animations. Defaults to Avalonia.Animation.FillMode.Forward, which keeps the final transform value after the animation completes and prevents a one-frame flash where the outgoing element snaps back to its original position before IsVisible = false takes effect.
OrientationGets the orientation of the animation.
SlideInEasingGets or sets element entrance easing.
SlideOutEasingGets or sets element exit easing.

Duration Property​

Gets the duration of the animation.

public TimeSpan Duration { get; set; }

FillMode Property​

Gets or sets the fill mode applied to both slide animations. Defaults to Avalonia.Animation.FillMode.Forward, which keeps the final transform value after the animation completes and prevents a one-frame flash where the outgoing element snaps back to its original position before IsVisible = false takes effect.

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

Orientation Property​

Gets the orientation of the animation.

public Avalonia.Animation.PageSlide.SlideAxis Orientation { get; set; }

SlideInEasing Property​

Gets or sets element entrance easing.

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

SlideOutEasing Property​

Gets or sets element exit easing.

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