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.

Question Comments

Added By: Shafeeq Weera 1 at: 7/30/2015 2:29:52 PM    

Hi I am using the Rich Edit Document Server, I have no controls to click on, all has to be done in code.
The documentation at https://documentation.devexpress.com/#DocumentServer/CustomDocument15306 is also referring to methods on the Richedit control. Is there a way to access the functionality through the document server elements?


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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