Table of Contents

Class LayoutAnimation

Namespace
FlowGraph.Avalonia.Animation
Assembly
FlowGraph.Avalonia.dll

Animates a set of nodes from their current positions to target positions. Intended for layout transitions (auto-layout, arrange, etc.).

public sealed class LayoutAnimation : IAnimation
Inheritance
LayoutAnimation
Implements
Inherited Members

Constructors

LayoutAnimation(IReadOnlyDictionary<string, Point>, IReadOnlyDictionary<string, Point>, double, Action<IReadOnlyDictionary<string, Point>>, Func<double, double>?, Action?)

public LayoutAnimation(IReadOnlyDictionary<string, Point> startPositions, IReadOnlyDictionary<string, Point> targetPositions, double duration, Action<IReadOnlyDictionary<string, Point>> onUpdate, Func<double, double>? easing = null, Action? onComplete = null)

Parameters

startPositions IReadOnlyDictionary<string, Point>
targetPositions IReadOnlyDictionary<string, Point>
duration double
onUpdate Action<IReadOnlyDictionary<string, Point>>
easing Func<double, double>
onComplete Action

Properties

IsComplete

Gets whether the animation has completed.

public bool IsComplete { get; }

Property Value

bool

Methods

Cancel()

Called when the animation completes or is cancelled.

public void Cancel()

Update(double)

Updates the animation with the elapsed time since the last frame.

public void Update(double deltaTime)

Parameters

deltaTime double

Time elapsed since last update in seconds.