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

RichEditControl.BeforeExport Event

Occurs before the document is saved (exported to a certain format).

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.RichEdit, DevExpress.Wpf.RichEdit

Declaration

public event BeforeExportEventHandler BeforeExport

Event Data

The BeforeExport event's data class is BeforeExportEventArgs. The following properties provide information specific to this event:

Property Description
CustomProperties Provides access to the document’s custom properties.
DocumentFormat Gets the format of the document being exported or saved.
Options Provides access to the exporter options.

Remarks

You can check the Document.RequiredExportCapabilities to be sure that the chosen export format supports them.

The BeforeExport event enables you to adjust the export options as required.

For RTF format, you can specify the RtfDocumentExporterCompatibilityOptions.DuplicateObjectAsMetafile property. For the HTML format, set the location of external content (images, css files) via the IExporterOptions.TargetUri property and specify other HtmlDocumentExporterOptions.

The following code snippets (auto-collected from DevExpress Examples) contain references to the BeforeExport 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