Table of Contents

Class CompositePageTransition

Namespace
Avalonia.Animation
Assembly
Avalonia.Base.dll

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

public class CompositePageTransition : IPageTransition
Inheritance
CompositePageTransition
Implements
Inherited Members

Remarks

Instantiate the CompositePageTransition in XAML and initialize the Transitions property in order to have many animations triggered at once. For example, you can combine CrossFade and 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

CompositePageTransition()

public CompositePageTransition()

Properties

PageTransitions

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

[Content]
public List<IPageTransition> PageTransitions { get; set; }

Property Value

List<IPageTransition>

Methods

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

Starts the animation.

public 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.