Skip to main content

RichEditControl.DocumentLoaded Event

Occurs after a document is loaded into the RichEdit control.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v23.2.dll

NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.RichEdit, DevExpress.Win.TreeMap


public event EventHandler DocumentLoaded

Event Data

The DocumentLoaded event's data class is EventArgs.


The DocumentLoaded event fires after the RichEditControl.LoadDocument or Document.LoadDocument method call.

The event is also raised when the following properties change their values:

The DocumentLoaded fires when the document model is built and the loaded document is valid. Handle the DocumentLayout.DocumentFormatted event to check the loaded document’s layout. Please note that the DocumentLoaded event raises asynchronously.


The RichEditControl does not provide a technique to determine the moment when all images with external references are downloaded and inserted in an HTML document.

The code sample below shows how to update fields in the main body of a loaded document:

richEditControl.DocumentLoaded += RichEditControl_DocumentLoaded;

private void RichEditControl_DocumentLoaded(object sender, EventArgs e)
    RichEditControl control = sender as RichEditControl;
    if (control.Document.Fields.Count != 0)

The following code snippets (auto-collected from DevExpress Examples) contain references to the DocumentLoaded event.


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