[CONNECT Update 17 C#] Navigating a TextBlock

TextBlock Class

From the DgnPlatformNet help document: In the TextBlock DOM, this is the master object that represents a piece of text as a whole, and is the primary high-level object used to deal with multi-line, formatted text (and is also generally recommended for any text, regardless of complexity). As described in the Text module documentation, TextBlock consists of a DOM (Document Object Model). Elements of the DOM include Paragraph and Run objects. Internally, lines are also computed, but only affect layout, and are not directly exposed.

Where is the Text module documentation?

Navigating the Components of a TextBlock

I'm writing an example AddIn using C# and the DgnPlatformNet API.  I want to pick a text element, then show its text content.  However, I'm having trouble interpreting the TextBlock API and its component classes.  Unfortunately, examples are rare.

From an element that contains text I can get a TextBlock.  I want to enumerate its components to see their content.  What are the navigable components of a TextBlock?  There are carets, runs and paragraphs.  Which of those contains a string obtained from the text element?

Some of the API seems incomplete.  For example, the ParagraphIterator: An STL iterator-like wrapper around Caret, that allows you to easily iterate paragraphs. See notes on Caret as to why this is helpful.  That gives me a Paragraph enumerator: In the TextBlock DOM, a collection of lines and runs.  But Paragraph doesn't provide any method to obtain a line or run, so how is that supposed to work?