Skip to main content

CompositionObject Class

Definition

Assembly:Avalonia.Base
Package:Avalonia

Base class of the composition API representing a node in the visual tree structure. Composition objects are the visual tree structure on which all other features of the composition API use and build on. The API allows developers to define and create one or many Avalonia.Rendering.Composition.CompositionVisual objects each representing a single node in a Visual tree.

public class CompositionObject

Methods

NameDescription
StartAnimationConnects an animation with the specified property of the object and starts the animation.
StartAnimationGroupStarts 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.
StopAnimationDisconnects an animation from the specified property and stops the animation.
StopAnimationGroupStops an animation group.

StartAnimation Method

Connects an animation with the specified property of the object and starts the animation.

public void StartAnimation(string propertyName, Avalonia.Rendering.Composition.Animations.CompositionAnimation animation)

Parameters

propertyName string

animation Avalonia.Rendering.Composition.Animations.CompositionAnimation

StartAnimationGroup Method

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.

public void StartAnimationGroup(Avalonia.Rendering.Composition.Animations.ICompositionAnimationBase grp)

Parameters

grp Avalonia.Rendering.Composition.Animations.ICompositionAnimationBase

StopAnimation Method

Disconnects an animation from the specified property and stops the animation.

public void StopAnimation(string propertyName)

Parameters

propertyName string

The name of the property to disconnect the animation from.

StopAnimationGroup Method

Stops an animation group.

public void StopAnimationGroup(Avalonia.Rendering.Composition.Animations.ICompositionAnimationBase grp)

Parameters

grp Avalonia.Rendering.Composition.Animations.ICompositionAnimationBase

The animation group to stop.

Properties

NameDescription
CompositorThe associated Compositor
ImplicitAnimationsThe collection of implicit animations attached to this object.
IsDisposedNo summary available.

Compositor Property

The associated Compositor

public Avalonia.Rendering.Composition.Compositor Compositor { get; set; }

ImplicitAnimations Property

The collection of implicit animations attached to this object.

public Avalonia.Rendering.Composition.Animations.ImplicitAnimationCollection ImplicitAnimations { get; set; }

IsDisposed Property

public bool IsDisposed { get; set; }