Text
Text is an inline run of characters. It carries a Contentstring and an optional TextStyle, and supports Find andReplace with regex, whole-word, and case-sensitivity options.
Create and Style a Text Run
Use case: Add styled text to a paragraph.
Find and Replace
Use case: Safely replace specific words in a run.
Regex-Based Replace
Use case: Replace numeric digits in a text run using a regular expression.
Find All Occurrences
Use case: Get character indices where a word occurs.
Frequently asked questions
What's the difference between Paragraph and Text?
A Paragraph is a block container; Text is an inline run that lives inside a paragraph. A paragraph can hold multiple runs with different styles.
Does Text support regular expressions?
Yes — both Find and Replace accept a RegexOptions argument.
Can I concatenate multiple styled runs into one line?
Yes. Call p.AddText(...) several times with different styles on the same paragraph.