Table of Contents

Class Brush

Namespace
Avalonia.Media
Assembly
Avalonia.Base.dll

Describes how an area is painted.

[TypeConverter(typeof(BrushConverter))]
public abstract class Brush : Animatable, INotifyPropertyChanged, IBrush
Inheritance
Brush
Implements
Derived
Inherited Members
Extension Methods

Constructors

Brush()

protected Brush()

Fields

OpacityProperty

Defines the Opacity property.

public static readonly StyledProperty<double> OpacityProperty

Field Value

StyledProperty<double>

TransformOriginProperty

Defines the TransformOrigin property

public static readonly StyledProperty<RelativePoint> TransformOriginProperty

Field Value

StyledProperty<RelativePoint>

TransformProperty

Defines the Transform property.

public static readonly StyledProperty<ITransform?> TransformProperty

Field Value

StyledProperty<ITransform>

Properties

Opacity

Gets or sets the opacity of the brush.

public double Opacity { get; set; }

Property Value

double

Transform

Gets or sets the transform of the brush.

public ITransform? Transform { get; set; }

Property Value

ITransform

TransformOrigin

Gets or sets the origin of the brush Transform

public RelativePoint TransformOrigin { get; set; }

Property Value

RelativePoint

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.

OnUnreferencedFromCompositor(Compositor)

protected virtual void OnUnreferencedFromCompositor(Compositor c)

Parameters

c Compositor

Parse(string)

Parses a brush string.

public static IBrush Parse(string s)

Parameters

s string

The brush string.

Returns

IBrush

The Color.