The WPF RichTextBox control, a WYSIWYG rich text editor, provides all the common word-processing features including editing text, formatting contents, resizing images and tables, finding and replacing text, spell checking, adding comments, printing, and importing and exporting Word documents. It helps you add a comprehensive word processor to your WPF applications that offers a familiar, Microsoft Word-like ribbon interface to your end users.
The WPF RichTextBox control was designed and optimized for high performance in every aspect.
Load documents with hundreds of pages instantly.
Edit and format content without any lag. Users can test their typing speed.
Render pages on demand. As a result, large documents are loaded faster with minimal memory consumption.
There is built-in support for working with Microsoft Word file formats (RTF, DOC, DOCX, XML). Therefore, you can seamlessly import, edit, and save documents to Microsoft Word format. You can also read and write password-protected Word documents.
The WPF RichTextBox control (WYSIWYG rich text editor) comes with its own fully featured ribbon control. You can save a lot of time by simply adding this control. However, you are free to create your own customized ribbon, as well.
Print an entire document or a specific page interactively. While printing, the user can also choose page orientation, size, etc.
Enjoy a smooth and user-friendly experience for mouse, touch, and keyboard interfaces.
Make selections with flexibility using mouse, touch, or Microsoft Word-like keyboard shortcuts.
Rapidly scroll among the document pages.
Interactively zoom in and out the page contents. Users can easily change the view to fit a page, multiple pages, or page width.
The WPF RichTextBox provides a seamless editing experience and offers intuitive, and touch-friendly UI options like context menus, a mini toolbar, dialogs, a navigation pane, and a reviewing pane.
Cut, copy, and paste formatted content within the same document or to an external application.
Perform multiple levels of undo and redo operations.
Dialogs help insert document elements and advanced formatting options with ease.
The Microsoft Word-inspired navigation pane provides intuitive UI options to search text, navigate through search results, and modify them with other text.
Spell checks as you type and flags misspelled words with a red wavy underline. The built-in review pane allows you to interactively correct spelling mistakes.
Perform common editing actions. The list of actions is updated automatically based on the selection context.
Drag and drop selected content within the same document or to an external application.
WPF RichTextBox provides an awesome user experience to interactively resize an image using the mouse or touch.
Adjust row height or column width interactively.
Show suggestions automatically on typing, similar to Outlook’s editor pop-up email list. This feature also allows customizing suggestion settings like the prefix symbol (@), search logic, and content inserted to the editor.
The rich document object model of the WPF RichTextBox control supports text, hyperlinks, images, tables, comments, headers, and footers.
Users can create or edit documents with text seamlessly.
Easily browse for an image file or online image URL and insert it in-line with text. Common raster image formats, like PNG, BMP, JPEG, and GIF, are supported.
Create simple or complex nested tables using built-in dialog. Users can add or remove rows and columns, define header rows, merge cells, or resize cells depending on their contents.
Link text for quick access to webpages, files, emails, bookmarks, etc. Users can insert many links through a built-in dialog and the Microsoft Word-inspired automatic conversion of text to links. Moreover, navigation can be customized to open the target from other applications.
Markup your documents with Microsoft Word-like comments.
The WPF RichTextBox control includes all the commonly used document formatting options.
Format text using bold, italics, underline, font family, size, color, highlight, subscript, superscript, etc.
Format paragraphs with indentation, alignment, and spacing.
Organize items or create an outline of the document with bullets and numbering. Both single and multilevel lists can be added.
Format a table with indent, alignment, cell margins and spacing, borders, shadings, row height, break row across pages, etc.
Design the structure and layout of document pages in each section by customizing size, margins, header distance, footer distance, etc.
Users can input text in various languages using the built-in input method editor and right-to-left support.
Users can seamlessly import, edit, and save documents to HTML format.
Easily bind the contents of the WPF RichTextBox control using MVVM pattern.
All static text in the control can be localized to any desired language.
Several built-in skins are available, including Metro, Office, and Visual Studio.
Easily get started with the WPF RichTextBox using a few simple lines of XAML or C# code example as demonstrated below. Also explore the WPF RichTextBox example that shows how to render and configure the RichTextBox in WPF.
<Syncfusion:RibbonWindow x:Class="DocumentEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DocumentEditor"
mc:Ignorable="d"
xmlns:Syncfusion="http://schemas.syncfusion.com/wpf"
Title="MainWindow" Height="350" Width="525" Syncfusion:SkinStorage.VisualStyle="Office2013">
<Grid x:Name="Root">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Syncfusion:SfRichTextRibbon x:Name="richTextRibbon" SnapsToDevicePixels="True" DataContext="{Binding ElementName=richTextBoxAdv}"/>
<Syncfusion:SfRichTextBoxAdv x:Name="richTextBoxAdv" Grid.Row="1" LayoutType="Pages" AcceptsTab="True" AllowDrop="True">
</Syncfusion:SfRichTextBoxAdv>
</Grid>
</Syncfusion:RibbonWindow>
using Syncfusion.Windows.Controls.RichTextBoxAdv;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media;
namespace RichTextEditor
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class DocumentEditorDemo : RibbonWindow
{
public DocumentEditorDemo()
{
InitializeComponent();
richTextBoxAdv.RequestNavigate += RichTextBoxAdv_RequestNavigate;
}
/// <summary>
/// Handles the RequestNavigate event of the richTextBoxAdv control.
/// </summary>
/// <param name="obj">The source of the event.</param>
/// <param name="args">The <see cref="Syncfusion.Windows.Controls.RichTextBoxAdv.RequestNavigateEventArgs"/> instance containing the event data.</param>
void RichTextBoxAdv_RequestNavigate(object obj, Syncfusion.Windows.Controls.RichTextBoxAdv.RequestNavigateEventArgs args)
{
if (args.Hyperlink.LinkType == Syncfusion.Windows.Controls.RichTextBoxAdv.HyperlinkType.Webpage || args.Hyperlink.LinkType == Syncfusion.Windows.Controls.RichTextBoxAdv.HyperlinkType.Email)
LaunchUri(new Uri(args.Hyperlink.NavigationLink).AbsoluteUri);
else if (args.Hyperlink.LinkType == HyperlinkType.File && File.Exists(args.Hyperlink.NavigationLink))
LaunchUri(args.Hyperlink.NavigationLink);
}
/// <summary>
/// Launches the URI.
/// </summary>
/// <param name="uri">The URI.</param>
private void LaunchUri(string navigationLink)
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo = new System.Diagnostics.ProcessStartInfo(navigationLink) { UseShellExecute = true };
process. Start();
}
}
}
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.
A good place to start would be our comprehensive getting started documentation.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.