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

HtmlDocumentExporterOptions.CssPropertiesExportType Property

Gets or sets how the style sheets properties are exported.

Namespace: DevExpress.XtraRichEdit.Export

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

Declaration

public CssPropertiesExportType CssPropertiesExportType { get; set; }

Property Value

Type Description
CssPropertiesExportType

A CssPropertiesExportType enumeration value specifying the export type.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to CssPropertiesExportType
WinForms Controls RichTextEditDocumentExportOptions
.Mht.CssPropertiesExportType
Office File API RichEditDocumentExportOptions
.Mht.CssPropertiesExportType

Remarks

Handle the RichEditControl.BeforeExport or RichEditDocumentServer.BeforeExport event and specify the css export type - that is, the location of stylesheets - via the BeforeExportEventArgs.Options property of the event arguments.

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