ExpressionAnimation Class
A Composition Animation that uses a mathematical equation to calculate the value for an animating property every frame.
Definition
Namespace: Avalonia.Rendering.Composition.Animations
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public sealed class ExpressionAnimation : CompositionAnimation
Public NotInheritable Class ExpressionAnimation
Inherits CompositionAnimation
[<SealedAttribute>]
type ExpressionAnimation =
class
inherit CompositionAnimation
end
Inheritance | Object → CompositionObject → CompositionAnimation → ExpressionAnimation |
Remarks
The core of ExpressionAnimations allows a developer to define a mathematical equation that can be used to calculate the value of a targeted animating property each frame. This contrasts KeyFrameAnimations, which use an interpolator to define how the animating property changes over time. The mathematical equation can be defined using references to properties of Composition objects, mathematical functions and operators and Input. Use the StartAnimation(String, CompositionAnimation) method to start the animation.
Properties
Compositor | The associated Compositor (Inherited from CompositionObject) |
Expression | The mathematical equation specifying how the animated value is calculated each frame. The Expression is the core of an ExpressionAnimation and represents the equation the system will use to calculate the value of the animation property each frame. The equation is set on this property in the form of a string. Although expressions can be defined by simple mathematical equations such as "2+2", the real power lies in creating mathematical relationships where the input values can change frame over frame. |
ImplicitAnimations | The collection of implicit animations attached to this object. (Inherited from CompositionObject) |
IsDisposed | (Inherited from CompositionObject) |
Target | (Inherited from CompositionAnimation) |
Methods
ClearAllParameters() | Clears all of the parameters of the animation. (Inherited from CompositionAnimation) |
ClearParameter(String) | Clears a parameter from the animation. (Inherited from CompositionAnimation) |
Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() | Serves as the default hash function. (Inherited from Object) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
SetColorParameter(String, Color) | (Inherited from CompositionAnimation) |
SetMatrix3x2Parameter(String, Matrix3x2) | (Inherited from CompositionAnimation) |
SetMatrix4x4Parameter(String, Matrix4x4) | (Inherited from CompositionAnimation) |
SetQuaternionParameter(String, Quaternion) | (Inherited from CompositionAnimation) |
SetReferenceParameter(String, CompositionObject) | (Inherited from CompositionAnimation) |
SetScalarParameter(String, Single) | (Inherited from CompositionAnimation) |
SetVector2Parameter(String, Vector2) | (Inherited from CompositionAnimation) |
SetVector3Parameter(String, Vector3) | (Inherited from CompositionAnimation) |
SetVector4Parameter(String, Vector4) | (Inherited from CompositionAnimation) |
StartAnimation(String, CompositionAnimation) | Connects an animation with the specified property of the object and starts the animation. (Inherited from CompositionObject) |
StartAnimationGroup(ICompositionAnimationBase) | Starts an animation group. The StartAnimationGroup method on CompositionObject lets you start CompositionAnimationGroup. All the animations in the group will be started at the same time on the object. (Inherited from CompositionObject) |
ToString() | Returns a string that represents the current object. (Inherited from Object) |