Table of Contents

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

string

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

key string
value Color

SetMatrix3x2Parameter(string, Matrix3x2)

public void SetMatrix3x2Parameter(string key, Matrix3x2 value)

Parameters

key string
value Matrix3x2

SetMatrix4x4Parameter(string, Matrix4x4)

public void SetMatrix4x4Parameter(string key, Matrix4x4 value)

Parameters

key string
value Matrix4x4

SetQuaternionParameter(string, Quaternion)

public void SetQuaternionParameter(string key, Quaternion value)

Parameters

key string
value Quaternion

SetReferenceParameter(string, CompositionObject)

public void SetReferenceParameter(string key, CompositionObject compositionObject)

Parameters

key string
compositionObject CompositionObject

SetScalarParameter(string, float)

public void SetScalarParameter(string key, float value)

Parameters

key string
value float

SetVector2Parameter(string, Vector2)

public void SetVector2Parameter(string key, Vector2 value)

Parameters

key string
value Vector2

SetVector3Parameter(string, Vector3)

public void SetVector3Parameter(string key, Vector3 value)

Parameters

key string
value Vector3

SetVector4Parameter(string, Vector4)

public void SetVector4Parameter(string key, Vector4 value)

Parameters

key string
value Vector4