WPF Rich Text Editor
- 5 minutes to read
The WPF 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 WPF Rich Text Editor In Your Project
Visit DevExpress.com to learn more about this product’s features, capabilities, and pricing options: WPF Rich Text Editor. To try DevExpress controls and libraries in your projects, download our fully-functional 30-day trial version.
If you are new to the Rich Text Editor control, we recommend that you first 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 User Interface. 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 data base entires (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 like page orientation, paper kind or margins. Divide 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 your documents to prevent unauthorized use. You can enable read-only mode or allow users to Track Changes, add comments, fill in forms, or protect sections 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 the 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 checking 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 the 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 checking feature to highlight words with possible errors.
Customize Editor UI
Review the list of UI elements that you can customize or hide from 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 RichEditControl.HorizontalScrollBarVisibility and RichEditControl.VerticalScrollBarVisibility 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 WPF 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 several 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.