Skip to main content

CompositionGradientBrush Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia
public class CompositionGradientBrush

Methods​

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

Properties​

NameDescription
CompositorThe associated Compositor Inherited from CompositionObject.
GradientStopsThe gradient stops. Mutations of the list itself are not tracked - assign the property to ship in-place edits made after a commit. Stops created via Avalonia.Rendering.Composition.Compositor.CreateGradientStop(double,Avalonia.Media.Color) stay live on the server and animate individually; other stops are snapshotted at serialization time.
ImplicitAnimationsThe collection of implicit animations attached to this object. Inherited from CompositionObject.
IsDisposedInherited from CompositionObject.
OpacityInherited from CompositionBrush.
RelativeTransformInherited from CompositionBrush.
SpreadMethodHow the gradient repeats outside the stop range.
TransformInherited from CompositionBrush.
TransformOriginInherited from CompositionBrush.

GradientStops Property​

The gradient stops. Mutations of the list itself are not tracked - assign the property to ship in-place edits made after a commit. Stops created via Avalonia.Rendering.Composition.Compositor.CreateGradientStop(double,Avalonia.Media.Color) stay live on the server and animate individually; other stops are snapshotted at serialization time.

public System.Collections.Generic.List<Avalonia.Media.IGradientStop> GradientStops { get; set; }

SpreadMethod Property​

How the gradient repeats outside the stop range.

public Avalonia.Media.GradientSpreadMethod SpreadMethod { get; set; }