Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

Document Layout API - Practical usage

$
0
0

This example demonstrates how RichEditControl's DocumentLayout API can be used to collect information about a currently clicked document element (as well as its parent elements):
Layout API

Depending on the type (text block, image, table cell, textbox, etc.) of a clicked element, the following information can be analyzed:
content, content bounds, position on a page, page bounds, current page index, a number of images/textboxes on a page, common text blocks count, etc.


In this example, different approaches are used to get layout information about a current element:
- Use the DocumentLayout.GetElement and DocumentLayout.GetElement[T] methods;
- 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 a current document layout" button.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>