Table of Contents

Class BrushExtensions

Namespace
Avalonia.Media
Assembly
Avalonia.Base.dll

Extension methods for brush classes.

public static class BrushExtensions
Inheritance
BrushExtensions
Inherited Members

Methods

ToImmutable(IBrush)

Converts a brush to an immutable brush.

public static IImmutableBrush ToImmutable(this IBrush brush)

Parameters

brush IBrush

The brush.

Returns

IImmutableBrush

The result of calling ToImmutable() if the brush is mutable, otherwise brush.

ToImmutable(IDashStyle)

Converts a dash style to an immutable dash style.

public static ImmutableDashStyle ToImmutable(this IDashStyle style)

Parameters

style IDashStyle

The dash style.

Returns

ImmutableDashStyle

The result of calling ToImmutable() if the style is mutable, otherwise style.

ToImmutable(IPen)

Converts a pen to an immutable pen.

public static ImmutablePen ToImmutable(this IPen pen)

Parameters

pen IPen

The pen.

Returns

ImmutablePen

The result of calling ToImmutable() if the brush is mutable, otherwise pen.