Skip to main content
A newer version of this page is available. .

RichEditControl Class

Represents a RichEdit control which is a container for the rich-text document providing all the necessary functionality.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v19.1.dll

Declaration

[ComVisible(false)]
[ToolboxBitmap(typeof(RichEditControl), "Bitmaps256.RichTextControl.bmp")]
[Docking(DockingBehavior.Ask)]
public class RichEditControl :
    Control,
    IPrintable,
    IBasePrintable,
    ISupportLookAndFeel,
    IToolTipControlClient,
    IGestureClient,
    IRectangularObjectRotationControllerOwner,
    IMouseWheelSupport,
    IInputStateProvider,
    IBarControllerOwner,
    IXtraTextEditor,
    IRichEditDocumentServer,
    IBatchUpdateable,
    IServiceContainer,
    IServiceProvider,
    IDisposable,
    IRichEditControl,
    IWin32Window,
    ICommandAwareControl<RichEditCommandId>,
    IInnerRichEditControlOwner,
    IInnerRichEditDocumentServerOwner,
    INotifyPropertyChanged,
    IRichEditDocumentLayoutProvider

Remarks

The RichEditControl is a word processing viewer. It processes text with any text direction.

image

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 Document Elements section for more information about the available elements and how to manage them.

You can load a document in code using the RichEditControl.LoadDocument() method overloads.

Check the Examples section for code examples used to solve different word processing tasks.

The RichEditControl provides control-specific options. Use the RichEditControlOptionsBase.Behavior property to retrieve settings used to control editor operations (save, print,clipboard operations, etc.)

The RichEditControlOptionsBase.DocumentCapabilities 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 with a ribbon UI and loads a document to it. Refer to the Getting Started section for step-by-step tutorials on how to create a Rich Text Editor application and provide it with a command UI.

this.Controls.Add(richEditControl.CreateRibbon());
richEditControl.LoadDocument("Documents//FirstLook.docx");

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.

See Also