[]
Represents a discrete section of formatted or unformatted text.
public class TextRun : FormattableInline
Creates a new instance of TextRun based on a subrange of an array of UTF-32 characters.
public TextRun(int[] codePoints, int startIndex, int count)
codePoints int[]An array of UTF-32 characters (code points).
startIndex intIndex of the first code point in the subrange.
count intNumber of code points in the subrange.
Creates a new instance of TextRun based on a subrange of an array of UTF-32 characters.
public TextRun(int[] codePoints, int startIndex, int count, TextFormat format)
codePoints int[]An array of UTF-32 characters (code points).
startIndex intIndex of the first code point in the subrange.
count intNumber of code points in the subrange.
format TextFormatThe text format to use.
Creates a new instance of TextRun.
public TextRun(string text)
text stringThe text of the section.
Creates a new instance of TextRun.
public TextRun(string text, TextFormat format)
text stringThe text of the section.
format TextFormatThe text format to use.
Gets or sets the text of the section.
public string Text { get; set; }
Gets the string of UTF-16 characters.
public override int GetCharCount()
Gets the string of UTF-16 characters.
public override string GetChars()