Color legend plain property method
An animation of properties of type T. It has the properties of BaseAnimation.
A class deriving from BaseAnimation. The styles page shows it in context.
Names are colored by what they are: a property, a method or an event; values and fields keep the plain color.
Properties
RunBoundaryValues 馃爢
RunBoundaryValues<T> 路 Read-only. The values applied when the animation starts and when it completes, or null.
State 馃爢
AnimationState 路 Read-only. Where the animation is: not started, running, paused or completed.
Methods
Animation() 馃爢
Animation(int durationMs, AnimationRepeatType repeatType = AnimationRepeatType.None, bool autoReverse = false, bool deleteOnComplete = true, RunBoundaryValues<T> runBoundaryValues = null, uint repeatsNumber = 1) 路 Creates an animation with a time line of durationMs milliseconds. repeatsNumber counts the runs of a NumberOfTimes animation. A duration of 0 or less completes at once with the end values.
| Parameter | Type | Description |
|---|---|---|
durationMs |
int |
The length of the time line, in milliseconds. 0 or less completes the animation at once with its end values. |
repeatType |
AnimationRepeatType |
How many runs the animation plays: one (None), repeatsNumber (NumberOfTimes), or until it is paused or removed (Infinite). Default: AnimationRepeatType.None. |
autoReverse |
bool |
Whether a run goes back along the time line after reaching its end. Default: false. |
deleteOnComplete |
bool |
Whether the UI removes the animation when it completes. Default: true. |
runBoundaryValues |
RunBoundaryValues<T> |
The values set on the properties when the animation first starts and when it completes, or null for none. Default: null. |
repeatsNumber |
uint |
The number of runs of a NumberOfTimes animation. Default: 1. |
AddDependencyProperty() 馃爢
AddDependencyProperty(DependencyProperty<T> property) 路 Adds a property the animation drives. One animation can drive several properties.
| Parameter | Type | Description |
|---|---|---|
property |
DependencyProperty<T> |
The property to drive: an element鈥檚 FooDP, such as banner.MarginDP. |
AddFrame() 馃爢
AddFrame(BaseAnimationFrame<T> frame) 路 Adds a smooth or discrete frame.
| Parameter | Type | Description |
|---|---|---|
frame |
BaseAnimationFrame<T> |
The frame to add: a SmoothAnimationFrame<T> or a DiscreteAnimationFrame<T>. |
AddTarget() 馃爢
AddTarget(BaseElement owner, Action<T> set) 路 Adds a target set through a setter: anything a value can be given to, a property that is no dependency property included. set gets each value, as a dependency property would. Once every target of the animation belongs to a disposed element, the UI lets go of the animation, as it does for dependency properties. Throws an ArgumentNullException when set is null. See setter targets.
| Parameter | Type | Description |
|---|---|---|
owner |
BaseElement |
The element the value belongs to, whose disposal tells that the target is gone. null for a value that belongs to no element: such a target never counts as disposed. |
set |
Action<T> |
The setter, given each value of the animation, such as value => angle = value. |
Pause() 馃爢
Pause() 路 Pauses a running animation; Start continues it.
Reset() 馃爢
Reset() 路 Puts the animation back to not started, at the start of its time line with its repeats restored. The properties keep their current values, and the animation stays among the UI鈥檚 animations.
Seek() 馃爢
Seek(int positionMs) 路 Puts the time line at a moment and gives the targets the values the animation has there, as a run going forward shows them, whatever they showed before: of the smooth frames, in the order they start, each one the moment is past gives its end value and the one it is in its value there (the first one鈥檚 start value before them all); of the discrete frames, the latest one at or before the moment. RunBoundaryValues are not applied. A running animation goes on from there, forward; one that isn鈥檛 running (not started, paused or completed) is paused there, and Start goes on from it. For a tool that shows a moment of the animation; PositionMs reads where it is. See starting, stopping and seeking.
| Parameter | Type | Description |
|---|---|---|
positionMs |
int |
The moment, in milliseconds from the start of the time line. Kept between 0 and DurationMs. |
Start() 馃爢
Start() 路 Runs a not started or paused animation and adds it to the UI鈥檚 animations if it isn鈥檛 there, so AddAnimation isn鈥檛 needed first. Started from not started (the first time, or after Stop or Reset), it applies RunBoundaryValues.StartValue, then the values of the time line鈥檚 start, so a frame that applies at 0 ms replaces StartValue at once. Does nothing on a completed animation (call Reset first) or on a NumberOfTimes animation with 0 repeats.
Stop() 馃爢
Stop() 路 Takes the animation out of the UI鈥檚 animations and puts it back to not started, at the start of its time line; the values it set stay. Start runs it again from the beginning. The counterpart of Start, for an animation you are done with before its elements are.