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
Implements:IPageTransition

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
StartStarts the animation.

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.

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; }