Table of Contents

Class TextRunProperties

Namespace
Avalonia.Media.TextFormatting
Assembly
Avalonia.Base.dll

Provides a set of properties, such as typeface or foreground brush, that can be applied to a TextRun object. This is an abstract class.

public abstract class TextRunProperties : IEquatable<TextRunProperties>
Inheritance
TextRunProperties
Implements
Derived
Inherited Members

Remarks

The text layout client provides a concrete implementation of this abstract class. This enables the client to implement text run properties in a way that corresponds with the associated formatting store.

Constructors

TextRunProperties()

protected TextRunProperties()

Properties

BackgroundBrush

Brush used to paint background of run.

public abstract IBrush? BackgroundBrush { get; }

Property Value

IBrush

BaselineAlignment

Run vertical box alignment

public virtual BaselineAlignment BaselineAlignment { get; }

Property Value

BaselineAlignment

CultureInfo

Run text culture.

public abstract CultureInfo? CultureInfo { get; }

Property Value

CultureInfo

FontFeatures

Optional features of used font.

public virtual FontFeatureCollection? FontFeatures { get; }

Property Value

FontFeatureCollection

FontRenderingEmSize

Em size of font used to format and display text

public abstract double FontRenderingEmSize { get; }

Property Value

double

ForegroundBrush

Brush used to fill text.

public abstract IBrush? ForegroundBrush { get; }

Property Value

IBrush

TextDecorations

Run TextDecorations.

public abstract TextDecorationCollection? TextDecorations { get; }

Property Value

TextDecorationCollection

Typeface

Run typeface

public abstract Typeface Typeface { get; }

Property Value

Typeface

Methods

Equals(TextRunProperties?)

public bool Equals(TextRunProperties? other)

Parameters

other TextRunProperties

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(TextRunProperties, TextRunProperties)

public static bool operator ==(TextRunProperties left, TextRunProperties right)

Parameters

left TextRunProperties
right TextRunProperties

Returns

bool

operator !=(TextRunProperties, TextRunProperties)

public static bool operator !=(TextRunProperties left, TextRunProperties right)

Parameters

left TextRunProperties
right TextRunProperties

Returns

bool