[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Expand]RichEditControl Document
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Spell Checking
    AutoCorrect Feature
    Track Changes
    Mail Merge
    Restrictions and Protection
   [Expand]Visual Elements
    Keyboard Shortcuts
    HTML Tag Support
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)


This document is an overview of the most useful events implemented for the RichEditControl.


A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T258534.

When a new document is created in RichEditControl via the RichEditControl.CreateNewDocument method, the RichEditControl.EmptyDocumentCreated event is raised.

When a document is loaded in RichEditControl, the RichEditControl.DocumentClosing event occurs. It enables you to take the necessary steps before the content of the previously loaded document is discarded. Then, the RichEditControl.BeforeImport event is raised, enabling you to configure the importer; and the RichEditControl.DocumentLoaded event indicates that the loading process is finalized.

The RichEditControl.ContentChanged event indicates changes in the control content, while the RichEditControl.ModifiedChanged event signalizes that the current document is modified and the RichEditControl.Modified property is changed. The ModifiedChanged event does not occur when a document is loaded or saved.


If the loaded document contains fields and the RichEditMailMergeOptions.ViewMergedData is set to true, the fields are automatically updated and the ModifiedChanged event fires.

When a document is saved, the RichEditControl.BeforeExport event occurs, enabling you to customize export settings, e.g. specify the location to store external content when the document is saved in HTML.

A special RichEditControl.UnhandledException event provides an easy-to-use method for processing exceptions, which are not handled by RichEditControl.

Some events are implemented to allow the customization of RichEditControl. The RichEditControl.PopupMenuShowing event allows you to modify a popup menu before it is shown. Numerous *FormShowing events (such as RichEditControl.FontFormShowing, RichEditControl.SearchFormShowing, RichEditControl.HyperlinkFormShowing etc.) enable you to add custom logic or validation to corresponding dialogs. Note that you can create descendants for almost all dialogs and override their methods as required.

User activity can be tracked by such events as RichEditControl.SelectionChanged, RichEditControl.HyperlinkClick, RichEditControl.StartHeaderFooterEditing, RichEditControl.ZoomChanged.

The mail merge process is also accompanied with events - RichEditControl.MailMergeStarted, RichEditControl.MailMergeRecordStarted, RichEditControl.MailMergeRecordFinished, RichEditControl.MailMergeFinished.

Special purpose events are the RichEditControl.AutoCorrect and the RichEditControl.CalculateDocumentVariable.

Expanded See Also

Is this topic helpful?​​​​​​​