Animated<T>

References
public class Animated<T>
Represents an animation over time of a specific value.
TType to animate.

Properties

Motion

#
public Motion Motion { get; }
Gets the motion type of this animator.

State

#
public State State { get; }
Gets the state of the animator. Once the state is AnimatorState.Finished, it will never change.

Time0

#
public DateTime Time0 { get; }
Gets the scheduled start time for this animation.

Time1

#
public DateTime Time1 { get; }
Gets the scheduled end time for this animation.

Value0

#
public T Value0 { get; }
Gets the start value of this animation.

Value1

#
public T Value1 { get; }
Gets the end value of this animation.

ValueNow

#
public T ValueNow { get; }
Gets the current value. The current value is only meaningful if the animator has been evaluated at least once.

Methods

Chain

#
public Animated<T> Chain(T target, DateTime timeStart, DateTime timeEnd, Motion motion)
Continue this animator by appending another one with a new target value.
target (T)New target value.
timeStart (DateTime)Start time for animator in UTC coordinates.
timeEnd (DateTime)End time for animator in UTC coordinates.
motion (Motion)New motion type.
Chained animator.

Chain

#
public Animated<T> Chain(T target, Duration duration, Motion motion)
Continue this animator by appending another one with a new target value.
target (T)New target value.
duration (Duration)New duration.
motion (Motion)New motion type.
Chained animator.

Chain

#
public Animated<T> Chain(T target, Motion motion)
Continue this animator by appending another one with a new target value. Local duration is retained.
target (T)New target value.
motion (Motion)New motion type.
Chained animator.

Chain

#
public Animated<T> Chain(T target, TimeSpan duration, Motion motion)
Continue this animator by appending another one with a new target value.
target (T)New target value.
duration (TimeSpan)New duration.
motion (Motion)New motion type.
Chained animator.

Chain

#
public Animated<T> Chain(T target)
Continue this animator by appending another one with a new target value. Local duration and motion properties are retained.
target (T)New target value.
Chained animator.

CreateFinished

#
public static Animated<T> CreateFinished(T value, Interpolate<T> interpolator)
Create a new constant animation.
value (T)Constant value.
interpolator (Interpolate<T>)Interpolator.
Animation.

CreateFinished

#
public static Animated<T> CreateFinished(T value, TimeSpan duration, Motion motion, Interpolate<T> interpolator)
Create a new constant animation.
value (T)Constant value.
duration (TimeSpan)Duration associated with this animation. The duration only becomes relevant when this animator is chained.
motion (Motion)Motion associated with this animation. The motion only becomes relevant when this animator is chained.
interpolator (Interpolate<T>)Interpolator.

CreateUnfinished

#
public static Animated<T> CreateUnfinished(T value0, T value1, DateTime time0, DateTime time1, Motion motion, Interpolate<T> interpolator)
Create a new constant animation.
value0 (T)Initial value.
value1 (T)Final value.
time0 (DateTime)Start time for animation.
time1 (DateTime)End time for animation, may not be earlier than the start time.
motion (Motion)Motion associated with this animation.
interpolator (Interpolate<T>)Interpolator.

CreateUnfinished

#
public static Animated<T> CreateUnfinished(T value0, T value1, TimeSpan duration, Motion motion, Interpolate<T> interpolator)
Create a new progressive animation, starting now.
value0 (T)Initial value.
value1 (T)Final value.
duration (TimeSpan)Duration of animation.
motion (Motion)Motion associated with this animator.
interpolator (Interpolate<T>)Interpolator.
Animation.

Evaluate

#
public T Evaluate(DateTime time)
Evaluate the animation.

This method should be called by graphics context, you typically never call it yourself.

Remarks: This method should only be called from the Graphics context.
time (DateTime)Time to evaluate at.
Evaluated value.

ToString

#
public override string ToString()
Gets a string description for this animated value.
Object.ToString

Operators

OperationResultDescription
Animated<T>+(T value, Motion motion, Duration duration)Animated<T>Chain an animator.
Animated<T>+TAnimated<T>Chain an animator.

Convertors

OperationResultDescription
implicitTAnimated<T>Default conversion from value to animated state.
implicitAnimated<T>TDefault conversion from animator to animating value.