Skip to content

Implement an extension method for RichEditControl.Document to modify the entire document content in a single place.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-rich-edit-iterate-through-all-sub-documents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinForms RichEdit - How to Iterate through all Sub-documents in a Document

This example demonstrates how to implement an extension method for RichEditControl.Document and specify a delegate that will be executed for each SubDocument in a document. This approach allows modifying the entire document content in a single place.

Implementation Details

RichEditControl's document is split into logical parts - SubDocuments. The document body, Text Boxes, comments, headers and footers for different document sections are stored in separate SubDocuments. Each SubDocument contains its own textual content, fields, bookmarks, hyperlinks, images, and shapes. In scenarios when such document elements should be edited for the entire document, it's necessary to get all document SubDocuments and edit each SubDocument separately.

Files to Review

C# Visual Basic
Form1.cs Form1.vb
SubDocumentHelper.cs SubDocumentHelper.vb

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Implement an extension method for RichEditControl.Document to modify the entire document content in a single place.

Topics

Resources

License

Stars

Watchers

Forks