Table of Contents

Class Run

Namespace
Avalonia.Controls.Documents
Assembly
Avalonia.Controls.dll

A terminal element in text flow hierarchy - contains a uniformatted run of unicode characters

public class Run : Inline, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed
Inheritance
Run
Implements
Inherited Members
Extension Methods

Constructors

Run()

Initializes an instance of Run class.

public Run()

Run(string?)

Initializes an instance of Run class specifying its text content.

public Run(string? text)

Parameters

text string

Text content assigned to the Run.

Fields

TextProperty

Dependency property backing Text.

public static readonly StyledProperty<string?> TextProperty

Field Value

StyledProperty<string>

Remarks

Note that when a TextRange that intersects with this Run gets modified (e.g. by editing a selection in RichTextBox), we will get two changes to this property since we delete and then insert when setting the content of a TextRange.

Properties

Text

The content spanned by this TextElement.

[Content]
public string? Text { get; set; }

Property Value

string

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.