Measuring RichString
The RichString
class provides various measurements of its contained text.
- Topten.RichTextKit.RichString.MeasuredWidth
- Topten.RichTextKit.RichString.MeasuredHeight
- Topten.RichTextKit.RichString.MeasuredLength
- Topten.RichTextKit.RichString.LineCount
Measuring TextBlock
The TextBlock
class provides various measurements of its contained text.
- Topten.RichTextKit.TextBlock.MeasuredWidth
- Topten.RichTextKit.TextBlock.MeasuredHeight
- Topten.RichTextKit.TextBlock.MeasuredLength
- Topten.RichTextKit.TextBlock.MeasuredPadding
- Topten.RichTextKit.TextBlock.MeasuredOverhang
Going Deeper
In addition to these basic measurements you can also inspect the text block's Lines collection and each line's FontRuns collection to get detailed information about the final layout of each line and font run.