Back to Devexpress

RichEditControl Class

windowsforms-devexpress-dot-xtrarichedit.md

latest5.5 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.RichEdit

Declaration

csharp
[ComVisible(false)]
[DXLicenseWinForms]
public class RichEditControl :
    Control,
    IPrintable,
    IBasePrintable,
    IPrintingTarget,
    ISupportLookAndFeel,
    IToolTipControlClient,
    IGestureClient,
    IRectangularObjectRotationControllerOwner,
    IMouseWheelSupport,
    IInputStateProvider,
    IBarControllerOwner,
    IXtraTextEditor,
    IDirectXProviderOwner,
    IDirectXClientProvider,
    IRoundedPanelLayoutSupport,
    IRichEditDocumentServer,
    IBatchUpdateable,
    IServiceContainer,
    IServiceProvider,
    IDisposable,
    IRichEditControl,
    ICommandAwareControl<RichEditCommandId>,
    IInnerRichEditControlOwner,
    IInnerRichEditDocumentServerOwner,
    INotifyPropertyChanged,
    IRichEditDocumentLayoutProvider,
    IWin32Window
vb
<ComVisible(False)>
<DXLicenseWinForms>
Public Class RichEditControl
    Inherits Control
    Implements IPrintable,
               IBasePrintable,
               IPrintingTarget,
               ISupportLookAndFeel,
               IToolTipControlClient,
               IGestureClient,
               IRectangularObjectRotationControllerOwner,
               IMouseWheelSupport,
               IInputStateProvider,
               IBarControllerOwner,
               IXtraTextEditor,
               IDirectXProviderOwner,
               IDirectXClientProvider,
               IRoundedPanelLayoutSupport,
               IRichEditDocumentServer,
               IBatchUpdateable,
               IServiceContainer,
               IServiceProvider,
               IDisposable,
               IRichEditControl,
               ICommandAwareControl(Of RichEditCommandId),
               IInnerRichEditControlOwner,
               IInnerRichEditDocumentServerOwner,
               INotifyPropertyChanged,
               IRichEditDocumentLayoutProvider,
               IWin32Window

The following members return RichEditControl objects:

Remarks

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

The Document and the SubDocument interfaces are the entry points for a RichEdit document. Use the IRichEditControl.Document property to access the Document instance.

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

Check the Rich Text Editor 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.

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

Implements

IPrintable

Inheritance

Object MarshalByRefObject Component Control RichEditControl SyntaxEditor

See Also

RichEditControl Members

WinForms Rich Text Editor

DevExpress.XtraRichEdit Namespace