.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

BeforeExportEventArgs.Options Property

Provides access to the exporter options.

Namespace: DevExpress.XtraRichEdit

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

Declaration

public IExporterOptions Options { get; }

Property Value

Type Description
IExporterOptions

An IExporterOptions interface defining export options.

Remarks

The Options parameter can define different objects, exposing the IExporterOptions interface, dependant on the export format and the type of exporter. Apart from the IExporterOptions.TargetUri, it allows specifying 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);
    }
}
See Also