Skip to main content
.NET Framework 4.5.2+

BeforeExportEventArgs.Options Property

Provides access to the exporter options.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v22.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

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);
    }
}

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