PageSlide Class
Definition
Transitions between two pages by sliding them horizontally or vertically.
public class PageSlide
Constructors
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| Start | Starts 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.
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
| Name | Description |
|---|---|
| Duration | Gets the duration of the animation. |
| FillMode | 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. |
| Orientation | Gets the orientation of the animation. |
| SlideInEasing | Gets or sets element entrance easing. |
| SlideOutEasing | Gets 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; }