RichEditControl Class
Represents a RichEdit control which is a container for the rich-text document providing all the necessary functionality.
Namespace: DevExpress.Xpf.RichEdit
Assembly: DevExpress.Xpf.RichEdit.v24.2.dll
NuGet Package: DevExpress.Wpf.RichEdit
Declaration
public class RichEditControl :
Control,
IGestureClient,
IBasePrintable,
IWin32Window,
IDisposable,
IToolTipControlClient,
ILogicalOwner,
IInputElement,
IOfficeFontSizeProvider,
IRichEditDocumentServer,
IBatchUpdateable,
IServiceContainer,
IServiceProvider,
IRichEditControl,
ICommandAwareControl<RichEditCommandId>,
IInnerRichEditControlOwner,
IInnerRichEditDocumentServerOwner,
INotifyPropertyChanged,
IRichEditDocumentLayoutProvider
Related API Members
The following members return RichEditControl objects:
Remarks
The RichEditControl is a word processing viewer. It processes text with any text direction. The RichEditControl ships with an integrated ribbon that allows end users to perform basic operations.
The Document and the SubDocument interfaces are the entry points for a RichEdit document. Use the IRichEditControl.Document property to access the Document instance.
Refer to the RichEditControl Document section for more information about the available elements and how to manage them.
You can provide a document source for the RichEditControl using the RichEditControl.DocumentSource property, or load a document in code behind using the RichEditControl.LoadDocument() method overloads.
Check the WPF Rich Text Editor Examples section for code examples used to solve different word processing tasks.
The RichEditControl provides control-specific options. Use the RichEditControl.BehaviorOptions property to retrieve settings used to control editor operations (save, print,clipboard operations, etc.)
The RichEditControl.DocumentCapabilitiesOptions property provides access to options used to control the use of document elements.
The Visual Elements section describes the RichEditControl’s interface and built-in dialogs.
The code sample below creates a new Rich Text Editor in XAML and provides a document source for it. Refer to the Get Started with WPF Rich Text Editor section for step-by-step tutorials on how to create a Rich Text Editor application and provide it with a command UI.
<Window 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:WpfApplication1"
xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"
x:Class="WpfApplication1.MainWindow"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<dxre:RichEditControl CommandBarStyle="Ribbon"
DocumentSource="pack://application:,,,/WpfApplication1;component/Document.docx"/>
</Grid>
</Window>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the RichEditControl class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.