New to Telerik UI for WinForms? Start a free 30-day trial

Represents a format provider that can import and export DOCX documents from/to RadDocument.

Definition

Namespace:Telerik.WinForms.Documents.FormatProviders.OpenXml.Docx

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class DocxFormatProvider : DocumentFormatProviderBase, IDocumentFormatProvider, IConfigurableDocxFormatProvider

Inheritance: objectDocumentFormatProviderBaseDocxFormatProvider

Implements: IConfigurableDocxFormatProviderIDocumentFormatProvider

Inherited Members DocumentFormatProviderBase.Import(byte[])DocumentFormatProviderBase.Export(RadDocument)

Constructors

Creates a provider with new DOCX import and export settings instances.

C#
public DocxFormatProvider()

Properties

Gets a value indicating whether this instance can export.

C#
public override bool CanExport { get; }
Property Value:

true if this instance can export; otherwise, false.

Overrides: DocumentFormatProviderBase.CanExport

Gets a value indicating whether this instance can import.

C#
public override bool CanImport { get; }
Property Value:

true if this instance can import; otherwise, false.

Overrides: DocumentFormatProviderBase.CanImport

Gets or sets the options passed to DocxExporter when exporting a document.

C#
public DocxExportSettings ExportSettings { get; set; }

Implements: IConfigurableDocxFormatProvider.ExportSettings

Gets the file-filter label displayed for DOCX documents.

C#
public override string FilesDescription { get; }

Overrides: DocumentFormatProviderBase.FilesDescription

Gets or sets the import-settings object. The current Import(Stream) implementation does not pass it to the DOCX importer.

C#
public DocxImportSettings ImportSettings { get; set; }

Implements: IConfigurableDocxFormatProvider.ImportSettings

Gets the name of the specific format provider.

C#
public override string Name { get; }
Property Value:

The name.

Overrides: DocumentFormatProviderBase.Name

Gets the extensions supported by this format provider.

C#
public override IEnumerable<string> SupportedExtensions { get; }
Property Value:

The supported extensions.

Overrides: DocumentFormatProviderBase.SupportedExtensions

Methods

Measures and arranges the document, then writes it as a DOCX package using ExportSettings.

C#
public override void Export(RadDocument document, Stream output)
Parameters:documentRadDocument

The document to export.

outputStream

The destination stream for the DOCX package.

Overrides: DocumentFormatProviderBase.Export(RadDocument, Stream)

Imports a DOCX package from a stream into a RadDocument.

C#
public override RadDocument Import(Stream input)
Parameters:inputStream

The stream containing the DOCX package.

Returns:

RadDocument

The imported document.

Overrides: DocumentFormatProviderBase.Import(Stream)