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

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
ResetResets any visual state applied to the given visual by this transition.
StartStarts the animation.
UpdateNo 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.

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.

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

to Avalonia.Visual

forward bool

pageLength double

visibleItems System.Collections.Generic.IReadOnlyList<Avalonia.Animation.PageTransitionItem>

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