- 2 minutes to read
The RichEditControl control implements the main Rich Edit functionality, and is available in the DX.20.1: Rich Text Editor toolbox tab in the Visual Studio IDE.
RichEditControl is a "plain" rich editor, without a toolbar or extra panels.
<Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"> <Grid> <dxre:RichEditControl HorizontalAlignment="Left" Margin="182,134,0,0" VerticalAlignment="Top" /> </Grid> </Window>
You can create a Ribbon or bar UI for the DXRichEdit, as described in the How to: Create Separate Command UI for a Rich Text Editor article.
The functionality of the RichEditControl is programmatically accessible using the native API. The Document interface, exposed via the RichEditControl.Document property, is the main way for a programmer to use API methods and properties.
The RichEditControl displays a document with a set of Views. When a document is loaded, the Document Model is constructed and transformed into the Document Layout. The current RichEditControl.ActiveView renders and displays the layout. Therefore, a document exists only in its native RichEdit representation. To get a document or a part of a document in any other format, a corresponding exporter is utilized.
For more information on the document structure and on the interaction between a model and a layout, refer to the Document Elements article.
For an overview of RichEditControl events, review the Events article.