Skip to content

DevExpress-Examples/winforms-richedit-layout-api-practical-usage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rich Text Editor for WinForms: Document Layout API - Practical Usage

This example demonstrates how to use RichEditControl's layout API to collect information about a currently clicked document element (and its parent elements).

Implementation Details

This example shows the following approaches to get layout information about a current element:

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.

Files to Review

C# Visual Basic
CustomDocumentLayoutVisitor.cs CustomDocumentLayoutVisitor.vb
DocumentElementLayoutHelper.cs DocumentElementLayoutHelper.vb
PageLayoutHelper.cs PageLayoutHelper.vb
RichEditDocumentLayoutAnalyzer.cs RichEditDocumentLayoutAnalyzer.vb
TextBoxLayoutHelper.cs TextBoxLayoutHelper.vb
Form1.cs Form1.vb

Documentation

About

Use the Document Layout API subset of the RichEditControl to collect information about a clicked document element .

Topics

Resources

License

Stars

Watchers

Forks