WinForms Rich Text Editor
- 6 minutes to read
The WinForms Rich Text Editor allows you to deliver Microsoft Word-inspired functionality with ease. It includes comprehensive text formatting options, supports mail merge, and ships with a rich collection of end-user options you can use to create high-impact document processing solutions.
Try DevExpress WinForms Rich Editor in Your Project
Visit DevExpress.com to learn more about this product’s features, capabilities, and pricing options: WinForms Rich Text Editor. To try DevExpress controls and libraries in your projects, download our fully-functional 30-day trial version.
Get Started
If you’re new to the Rich Text Editor control, we recommend that you first run the demo projects included with the installation. The screenshot below shows one of the samples.
If you are ready to integrate our Rich Editor into your application, review the following introductory documents:
Supported Document Elements
The Rich Text Editor supports a variety of document elements. You can organize them in code or the User Interface (UI). Documents with any of these elements can be printed and exported to PDF:
- Lists
- Shapes and Pictures
- Tables
- Charts
- Hyperlinks and Bookmarks
- Headers and Footers
- Footnotes and Endnotes
- Watermarks
- Content Controls
- OLE Objects
- ActiveX Controls
Import, Export, and Print
You can create new or load existing documents and then save them to different file formats. The Rich Text Editor works with left-to-right and right-to-left document layouts.
Print documents in code, or use our Print Dialog. You can use default printer settings, change them in code, or let users pick the page range, the number of copies, and other settings in the UI.
Mail Merge and Dynamic Content
Use the Mail Merge feature to automate document generation. Create a template with value placeholders, and connect an external data source to generate multiple documents. The Rich Text Editor has a set of events that allow you to control this process at every stage.
You can use fields to insert dynamic content, such as RSS feed or database entries (text, images, barcodes, and so on). Fields are automatically updated when the document is saved, printed, or when a mail merge operation is executed.
Format Documents
The WinForms Rich Text Editor ships with the following format features:
Format document text. You can change individual format attributes of any text fragment. You can also create styles that set multiple format attributes simultaneously, and apply the same formatting to different text fragments.
Change the page layout. Apply settings such as page orientation, paper kind, or margins. Divide a page into columns and insert page breaks. You can apply separate layout settings to the first page of your document and hide its header and footer to start numbering from the second page.
Build a table of contents. The control can scan the entire document or look for specific parts marked as table of content entries.
Enable word hyphenation. Embed different dictionaries to automatically hyphenate text.
Protect and Secure Documents
The Rich Text Editor allows you to prevent unauthorized access to your documents with these features:
- Protect documents to prevent unauthorized use. You can enable read-only mode or allow users to Track Changes, add comments, modify only certain sections, or fill in forms in your document without making any other modifications.
- Restrict editing to specific portions of a given document. Control what users can and cannot edit depending on their authentication credentials.
- Open and save password-encrypted documents. The Rich Text Editor supports standard binary and agile XML encryption types.
- Configure actions available to users. Unavailable operations are hidden from corresponding context menus and disabled within the control’s Ribbon UI.
Check Spelling and Review Documents
The Rich Text Editor offers the following spell check and collaboration options:
- Enable Track Changes. View, accept, or reject revisions made to a document. Specify a color and format for each revision type and change the review mode.
- Insert, modify, and delete comments. Highlight comments in the document, filter them by author, and specify whether to display comments in the document margins or in the Reviewing Pane.
- Implement the autocorrect service. This service analyzes the entered text and automatically fixes errors based on specific rules and permissions.
- Activate the spell check feature to highlight words with possible spelling errors.
Customize Editor UI
Review the list of UI elements that you can customize or hide from the view:
- Command UI
- Add a Ribbon UI or a set of toolbars to the Rich Text Editor. Each command bar type enables users to perform basic operations (format and edit text, create lists, add headers and footers, work with tables, etc.).
- Rulers
- Horizontal and vertical rulers help users align text, shapes, tables, and other elements.
- Scrollbars
- The document view can display horizontal and vertical scrollbars if a page does not fit into the control’s display area. Use the HorizontalScrollbar and VerticalScrollbar properties to control the scrollbar visibility.
- Reviewing Pane
- The Reviewing Pane displays all comments contained in the document and allows users to navigate throughout the comments and modify them.
- Pop-Up Menus
- The Rich Text Editor ships with various pop-up menu types, and each visual object has its own pop-up menu.
- Dialogs
- The Rich Text Editor ships with a number of dialogs used to complete a broad range of tasks, such as change paragraph and character format, specify a table or page layout, etc.
DevExpress Word Processing Document API
The WinForms Rich Text Editor control and the non-visual Word Processing Document API library share a common API used to manage rich text documents in code. This library offers a few unique features you may find useful for your Rich Text Editor app:
- Load, save, and export (to PDF and HTML) documents asynchronously
- Digitally sign Microsoft Word documents
- Export document pages to images
You need an active license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use these features in production code. For pricing information, refer to the following page: DevExpress Subscription Plans.