Class CompositionAnimation
- Namespace
- Avalonia.Rendering.Composition.Animations
- Assembly
- Avalonia.Base.dll
This is the base class for ExpressionAnimation and KeyFrameAnimation.
public abstract class CompositionAnimation : CompositionObject, ICompositionAnimationBase
- Inheritance
-
CompositionAnimation
- Implements
- Derived
- Inherited Members
Remarks
Use the StartAnimation(string, CompositionAnimation) method to start the animation. Value parameters (as opposed to reference parameters which are set using SetReferenceParameter(string, CompositionObject)) are copied and "embedded" into an expression at the time CompositionObject.StartAnimation is called. Changing the value of the variable after StartAnimation(string, CompositionAnimation) is called will not affect the value of the ExpressionAnimation. See the remarks section of ExpressionAnimation for additional information.
Properties
Target
public string? Target { get; set; }
Property Value
Methods
ClearAllParameters()
Clears all of the parameters of the animation.
public void ClearAllParameters()
ClearParameter(string)
Clears a parameter from the animation.
public void ClearParameter(string key)
Parameters
key
string
SetColorParameter(string, Color)
public void SetColorParameter(string key, Color value)
Parameters
SetMatrix3x2Parameter(string, Matrix3x2)
public void SetMatrix3x2Parameter(string key, Matrix3x2 value)
Parameters
SetMatrix4x4Parameter(string, Matrix4x4)
public void SetMatrix4x4Parameter(string key, Matrix4x4 value)
Parameters
SetQuaternionParameter(string, Quaternion)
public void SetQuaternionParameter(string key, Quaternion value)
Parameters
key
stringvalue
Quaternion
SetReferenceParameter(string, CompositionObject)
public void SetReferenceParameter(string key, CompositionObject compositionObject)
Parameters
key
stringcompositionObject
CompositionObject
SetScalarParameter(string, float)
public void SetScalarParameter(string key, float value)
Parameters
SetVector2Parameter(string, Vector2)
public void SetVector2Parameter(string key, Vector2 value)
Parameters
SetVector3Parameter(string, Vector3)
public void SetVector3Parameter(string key, Vector3 value)
Parameters
SetVector4Parameter(string, Vector4)
public void SetVector4Parameter(string key, Vector4 value)