Class KeyFrameAnimation
- Namespace
- Avalonia.Rendering.Composition.Animations
- Assembly
- Avalonia.Base.dll
A time-based animation with one or more key frames. These frames are markers, allowing developers to specify values at specific times for the animating property. KeyFrame animations can be further customized by specifying how the animation interpolates between keyframes.
public abstract class KeyFrameAnimation : CompositionAnimation, ICompositionAnimationBase
- Inheritance
-
KeyFrameAnimation
- Implements
- Derived
- Inherited Members
Properties
DelayBehavior
The delay behavior of the key frame animation.
public AnimationDelayBehavior DelayBehavior { get; set; }
Property Value
DelayTime
Delay before the animation starts after StartAnimation(string, CompositionAnimation) is called.
public TimeSpan DelayTime { get; set; }
Property Value
Direction
The direction the animation is playing. The Direction property allows you to drive your animation from start to end or end to start or alternate between start and end or end to start if animation has an IterationCount greater than one. This gives an easy way for customizing animation definitions.
public PlaybackDirection Direction { get; set; }
Property Value
Duration
The duration of the animation. Minimum allowed value is 1ms and maximum allowed value is 24 days.
public TimeSpan Duration { get; set; }
Property Value
IterationBehavior
The iteration behavior for the key frame animation.
public AnimationIterationBehavior IterationBehavior { get; set; }
Property Value
IterationCount
The number of times to repeat the key frame animation.
public int IterationCount { get; set; }
Property Value
StopBehavior
Specifies how to set the property value when animation is stopped
public AnimationStopBehavior StopBehavior { get; set; }
Property Value
Methods
InsertExpressionKeyFrame(float, string, Easing?)
Inserts an expression keyframe.
public void InsertExpressionKeyFrame(float normalizedProgressKey, string value, Easing? easingFunction = null)
Parameters
normalizedProgressKey
floatThe time the key frame should occur at, expressed as a percentage of the animation Duration. Allowed value is from 0.0 to 1.0.
value
stringThe expression used to calculate the value of the key frame.
easingFunction
EasingThe easing function to use when interpolating between frames.