Table of Contents

Class PageSlide

Namespace
Avalonia.Animation
Assembly
Avalonia.Base.dll

Transitions between two pages by sliding them horizontally or vertically.

public class PageSlide : IPageTransition
Inheritance
PageSlide
Implements
Derived
Inherited Members

Constructors

PageSlide()

Initializes a new instance of the PageSlide class.

public PageSlide()

PageSlide(TimeSpan, SlideAxis)

Initializes a new instance of the PageSlide class.

public PageSlide(TimeSpan duration, PageSlide.SlideAxis orientation = SlideAxis.Horizontal)

Parameters

duration TimeSpan

The duration of the animation.

orientation PageSlide.SlideAxis

The axis on which the animation should occur

Properties

Duration

Gets the duration of the animation.

public TimeSpan Duration { get; set; }

Property Value

TimeSpan

Orientation

Gets the orientation of the animation.

public PageSlide.SlideAxis Orientation { get; set; }

Property Value

PageSlide.SlideAxis

SlideInEasing

Gets or sets element entrance easing.

public Easing SlideInEasing { get; set; }

Property Value

Easing

SlideOutEasing

Gets or sets element exit easing.

public Easing SlideOutEasing { get; set; }

Property Value

Easing

Methods

GetVisualParent(Visual?, Visual?)

Gets the common visual parent of the two control.

protected static Visual GetVisualParent(Visual? from, Visual? to)

Parameters

from Visual

The from control.

to Visual

The to control.

Returns

Visual

The common parent.

Remarks

Any one of the parameters may be null, but not both.

Exceptions

ArgumentException

The two controls do not share a common parent.

Start(Visual?, Visual?, bool, CancellationToken)

Starts the animation.

public virtual Task Start(Visual? from, Visual? to, bool forward, CancellationToken cancellationToken)

Parameters

from Visual

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

to 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 CancellationToken

Animation cancellation.

Returns

Task

A Task that tracks the progress of the animation.