Table of Contents

Class GradientBrush

Namespace
Avalonia.Media
Assembly
Avalonia.Base.dll

Base class for brushes that draw with a gradient.

public abstract class GradientBrush : Brush, INotifyPropertyChanged, IGradientBrush, IBrush
Inheritance
GradientBrush
Implements
Derived
Inherited Members
Extension Methods

Fields

GradientStopsProperty

Defines the GradientStops property.

public static readonly StyledProperty<GradientStops> GradientStopsProperty

Field Value

StyledProperty<GradientStops>

SpreadMethodProperty

Defines the SpreadMethod property.

public static readonly StyledProperty<GradientSpreadMethod> SpreadMethodProperty

Field Value

StyledProperty<GradientSpreadMethod>

Properties

GradientStops

[Content]
public GradientStops GradientStops { get; set; }

Property Value

GradientStops

SpreadMethod

Gets the brush's spread method that defines how to draw a gradient that doesn't fill the bounds of the destination control.

public GradientSpreadMethod SpreadMethod { get; set; }

Property Value

GradientSpreadMethod

Methods

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

Parameters

change AvaloniaPropertyChangedEventArgs

The property change details.

ToImmutable()

Creates an immutable clone of the brush.

public abstract IImmutableBrush ToImmutable()

Returns

IImmutableBrush

The immutable clone.