Animator
Hold it in a field for as long as it runs: it owns a native peer, and a collected animator stops ticking.
- Kind: Class
- Namespace: SkeleKit
- Implements:
IDisposable
Properties
Fraction
How far the animation has run, from 0 to 1.
Assign it to scrub, e.g. from a drag.
Type: double
IsReversed
Whether the animation is headed backwards, towards where it started.
Takes effect on the next
Continue.
Type: bool
IsRunning
Whether the animation is currently running on its own.
Type: bool
Methods
Continue
Runs the animation from wherever it is towards its current heading.
For a spring,
velocitycarries the gesture's speed in, as full travels per second, positive towards the end.
| Parameter | Summary |
|---|---|
(optional) double velocity | The initial velocity in full travels per second. |
Create
Prepares an animation of the changes made in changes.
It does not run until
Start.Only what
changestouches is animated. Transforms, Opacity, CornerRadius, colors, gradients and layout lengths all interpolate; what has no in-between (a Material, a system color, an auto-sized Width) snaps when the animation settles.
| Parameter | Summary |
|---|---|
Animation animation | The timing and easing to use. |
Action changes | The property changes to capture. |
Returns
Animator: The prepared animator.
Dispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
OnCompleted
Calls handler when the animation ends, with true if it reached the end rather than being interrupted.
Pause
Freezes the animation where it is, so Fraction can drive it instead.
Reverse
Turns the animation around, keeping its momentum.
Start
Runs the animation, after delay seconds if given.
| Parameter | Summary |
|---|---|
(optional) double delay | The delay before starting, in seconds. |
Stop
Ends the animation.
It settles where it is, unless
finishjumps it to the end.
| Parameter | Summary |
|---|---|
(optional) bool finish | Whether to jump to the end before stopping. |