Text Overflow
If you place more text in a RichTextBlock (or TextBlock) than what fits in its bounds, you could wrap it in a ScrollViewer to make it all readable. RichTextBlock, however, supports a nifty trick that enables text that doesn’t fit to spill into a special element called RichTextBlockOverflow that you can place anywhere. If the remaining content doesn’t all fit in the RichTextBlockOverflow, it can spill into another RichTextBlockOverflow, and so on.
To enable this feature, all you need to do is set RichTextBlock’s OverflowContentTarget property to the desired RichTextBlockOverflow instance. RichTextBlockOverflow has its own OverflowContentTarget property so you can keep chaining RichTextBlockOverflows to each other. You could use this ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access