This example demonstrates how to use RichEditControl's layout API to collect information about a currently clicked document element (and its parent elements).
This example shows the following approaches to get layout information about a current element:
- Use the DocumentLayout.GetElement method overloads;
- Use the
LayoutIterator
class; - Use a custom LayoutVisitor descendant.
To get layout information about the current element, set the caret inside a text block or table cell (or select an image) and click the Analyze current document layout button.
Depending on the type (text block, image, table cell, textbox, etc.) of a clicked element, you can retrieve the following information:
- Content
- Content bounds
- Position on a page
- Page bounds
- Current page index
- Number of images/text boxes on a page
- Common text blocks count, etc.
(you will be redirected to DevExpress.com to submit your response)