Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BeforeExportEventArgs.Options Property

Provides access to the exporter options.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v24.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 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