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.
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.
C# | Visual Basic |
---|---|
Form1.cs | Form1.vb |
SubDocumentHelper.cs | SubDocumentHelper.vb |
(you will be redirected to DevExpress.com to submit your response)