Skip to main content

BeforeExportEventArgs.Options Property

Provides access to the exporter options.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

public IExporterOptions Options { get; }

Property Value

Type Description
IExporterOptions

An IExporterOptions interface defining export options.

Remarks

The e.Options property can define different objects depending on the export format and the type of exporter. Apart from the IExporterOptions.TargetUri, it specifies different exporter-specific settings.

When exporting to HTML, you can specify several HTML export options, casting the Options value to the HtmlDocumentExporterOptions type. For example, to specify whether the style sheets should be saved in separate css files, or incorporated in the main document, use the HtmlDocumentExporterOptions.CssPropertiesExportType property.

The following code snippet illustrates this:

View Example

private void richEditControl_BeforeExport(object sender, DevExpress.XtraRichEdit.BeforeExportEventArgs e) {
    DevExpress.XtraRichEdit.Export.HtmlDocumentExporterOptions options = e.Options as DevExpress.XtraRichEdit.Export.HtmlDocumentExporterOptions;
    if (options != null) 
{
        options.CssPropertiesExportType = DevExpress.XtraRichEdit.Export.Html.CssPropertiesExportType.Link;
        options.HtmlNumberingListExportFormat = DevExpress.XtraRichEdit.Export.Html.HtmlNumberingListExportFormat.HtmlFormat;
        options.TargetUri = Path.GetFileNameWithoutExtension(this.fileName);
    }
}

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

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