Skip to main content

CompositePageTransition Class

Definition

Assembly:Avalonia.Base
Package:Avalonia

Defines a composite page transition that can be used to combine multiple transitions.

public class CompositePageTransition

Inheritance: object -> CompositePageTransition

Implements:IPageTransition

Remarks

Instantiate the Avalonia.Animation.CompositePageTransition in XAML and initialize the Avalonia.Animation.Transitions property in order to have many animations triggered at once. For example, you can combine Avalonia.Animation.CrossFade and Avalonia.Animation.PageSlide.

<reactiveUi:RoutedViewHost Router="{Binding Router}">
<reactiveUi:RoutedViewHost.PageTransition>
<CompositePageTransition>
<PageSlide Duration="0.5" />
<CrossFade Duration="0.5" />
</CompositePageTransition>
</reactiveUi:RoutedViewHost.PageTransition>
</reactiveUi:RoutedViewHost>

Constructors

NameDescription
CompositePageTransitionNo summary available.

CompositePageTransition Constructor

public CompositePageTransition()

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
PageTransitionsGets or sets the transitions to be executed. Can be defined from XAML.

PageTransitions Property

Gets or sets the transitions to be executed. Can be defined from XAML.

public System.Collections.Generic.List<Avalonia.Animation.IPageTransition> PageTransitions { get; set; }