Table of Contents

Class BoxSelectionAnimation

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

Animates a box selection rectangle.

public class BoxSelectionAnimation : IAnimation
Inheritance
BoxSelectionAnimation
Implements
Inherited Members

Constructors

BoxSelectionAnimation(double, Action<double>?)

Creates a new box selection animation.

public BoxSelectionAnimation(double dashSpeed = 30, Action<double>? onUpdate = null)

Parameters

dashSpeed double

Speed of dash animation in pixels per second.

onUpdate Action<double>

Callback with current dash offset.

Properties

CurrentDashOffset

Gets the current dash offset for animated border.

public double CurrentDashOffset { get; }

Property Value

double

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.