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

RichEditControl.DocumentLoaded Event

Occurs after a document is fully loaded.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v19.1.dll

Declaration

public event EventHandler DocumentLoaded

Event Data

The DocumentLoaded event's data class is EventArgs.

Remarks

The DocumentLoaded fires when the document model is built and the loaded document is valid.

Call the RichEditControl.LoadDocument or Document.LoadDocument method to load a document.

You can specify the following properties to load content in the specific format:

Handle the DocumentLayout.DocumentFormatted event to check the loaded document’s layout.

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

richEditControl.DocumentLoaded += RichEditControl_DocumentLoaded;
richEditControl.LoadDocument("FirstLook.docx");

private void RichEditControl1_DocumentLoaded(object sender, EventArgs e)
{
    if (richEditControl1.Document.Fields.Count != 0)
    {
        richEditControl1.Document.Fields.Update();
    }
}

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

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