Table of Contents

Class Animator

Namespace
PluginUI
Assembly
PluginUI.dll

Drives animations from the host frame timer. Obtain it through Animator.

public sealed class Animator
Inheritance
Animator
Inherited Members

Properties

IsRunning

true if at least one animation is running.

public bool IsRunning { get; }

Property Value

bool

Methods

Animate(Color, Color, double, Action<Color>, Func<float, float>?, Action?)

Animates a color.

public Animation Animate(Color from, Color to, double durationSeconds, Action<Color> setter, Func<float, float>? easing = null, Action? completed = null)

Parameters

from Color
to Color
durationSeconds double
setter Action<Color>
easing Func<float, float>
completed Action

Returns

Animation

Animate(float, float, double, Action<float>, Func<float, float>?, Action?)

Animates a float from from to to.

public Animation Animate(float from, float to, double durationSeconds, Action<float> setter, Func<float, float>? easing = null, Action? completed = null)

Parameters

from float
to float
durationSeconds double
setter Action<float>
easing Func<float, float>
completed Action

Returns

Animation

CancelAll()

Cancels every running animation.

public void CancelAll()

Fade(UIElement, float, double, Action?)

Fades an element's opacity.

public Animation Fade(UIElement element, float to, double durationSeconds = 0.2, Action? completed = null)

Parameters

element UIElement
to float
durationSeconds double
completed Action

Returns

Animation

Start(double, Action<float>, Func<float, float>?, Action?, int, bool)

Starts an animation calling apply with the eased progress (0 → 1) on each frame.

public Animation Start(double durationSeconds, Action<float> apply, Func<float, float>? easing = null, Action? completed = null, int repeatCount = 0, bool autoReverse = false)

Parameters

durationSeconds double
apply Action<float>
easing Func<float, float>
completed Action
repeatCount int
autoReverse bool

Returns

Animation