Class TextRun
Represents a run of text spanning a series of graphemes within a string.
public class TextRun
- Inheritance
-
TextRun
- Derived
- Inherited Members
Properties
End
Gets or sets the exclusive end index of the last grapheme in this TextRun.
public int End { get; set; }
Property Value
Font
Gets or sets the font for this run.
public Font? Font { get; set; }
Property Value
Placeholder
Gets or sets the inline placeholder represented by this run.
public TextPlaceholder? Placeholder { get; set; }
Property Value
Remarks
Start
Gets or sets the inclusive start index of the first grapheme in this TextRun.
public int Start { get; set; }
Property Value
TextAttributes
Gets or sets the text attributes applied to this run.
public TextAttributes TextAttributes { get; set; }
Property Value
TextDecorations
Gets or sets the text decorations applied to this run.
public TextDecorations TextDecorations { get; set; }
Property Value
Methods
Slice(ReadOnlySpan<char>)
Returns the slice of the given text representing this TextRun.
public ReadOnlySpan<char> Slice(ReadOnlySpan<char> text)
Parameters
textReadOnlySpan<char>The text to slice.
Returns
- ReadOnlySpan<char>
The ReadOnlySpan<T>.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.