-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
IPageTransition.cs
31 lines (30 loc) · 1.01 KB
/
IPageTransition.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.Threading;
using System.Threading.Tasks;
namespace Avalonia.Animation
{
/// <summary>
/// Interface for animations that transition between two pages.
/// </summary>
public interface IPageTransition
{
/// <summary>
/// Starts the animation.
/// </summary>
/// <param name="from">
/// The control that is being transitioned away from. May be null.
/// </param>
/// <param name="to">
/// The control that is being transitioned to. May be null.
/// </param>
/// <param name="forward">
/// If the animation is bidirectional, controls the direction of the animation.
/// </param>
/// <param name="cancellationToken">
/// Animation cancellation.
/// </param>
/// <returns>
/// A <see cref="Task"/> that tracks the progress of the animation.
/// </returns>
Task Start(Visual? from, Visual? to, bool forward, CancellationToken cancellationToken);
}
}