Rich Text Editor for WinForms - How to Remove an Empty Paragraph when Appending a Content to a Document
This example illustrates multiple methods to remove an empty paragraph when appending a content to a document in the RichEditControl (the same is applicable to the Word Processing Document API).
The application form contains 4 buttons to use different approaches to complete the task.
-
The first button removes the paragraph mark (e.g.,
\par
in case of RTF format) from the source content being added to a document. -
The second buttons searches and removes paragraph marks.
-
The third button calls the SubDocument.AppendDocumentContent method because it handles this scenario automatically.
-
The last button uses the SubDocument.Delete method to remove empty paragraphs between tables.
- Form1.cs (VB: Form1.vb)
- Program.cs (VB: Program.vb)
(you will be redirected to DevExpress.com to submit your response)