Table of Contents

Class SelectionBorderAnimation

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

Animates a node's selection border fading in.

public class SelectionBorderAnimation : IAnimation
Inheritance
SelectionBorderAnimation
Implements
Inherited Members

Constructors

SelectionBorderAnimation(Node, bool, double, Action<Node, double>?, Action?)

Creates a new selection border animation.

public SelectionBorderAnimation(Node node, bool selecting, double duration = 0.15, Action<Node, double>? onUpdate = null, Action? onComplete = null)

Parameters

node Node
selecting bool
duration double
onUpdate Action<Node, double>
onComplete Action

Properties

CurrentOpacity

Gets the current border opacity.

public double CurrentOpacity { 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()

Deselect(Node, Action<Node, double>?, Action?)

Creates an animation for when a node becomes deselected.

public static SelectionBorderAnimation Deselect(Node node, Action<Node, double>? onUpdate = null, Action? onComplete = null)

Parameters

node Node
onUpdate Action<Node, double>
onComplete Action

Returns

SelectionBorderAnimation

Select(Node, Action<Node, double>?, Action?)

Creates an animation for when a node becomes selected.

public static SelectionBorderAnimation Select(Node node, Action<Node, double>? onUpdate = null, Action? onComplete = null)

Parameters

node Node
onUpdate Action<Node, double>
onComplete Action

Returns

SelectionBorderAnimation

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.