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 |
|---|---|
| Reset | Resets any visual state applied to the given visual by this transition. |
| Start | Starts the animation. |
| Update | No 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.
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
forward bool
pageLength double
visibleItems System.Collections.Generic.IReadOnlyList<Avalonia.Animation.PageTransitionItem>
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; }