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

Defines the metadata and conversion operations used to import and export RadDocument values in a file format.

Definition

Namespace:Telerik.WinForms.Documents.FormatProviders

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public interface IDocumentFormatProvider

Properties

Gets whether this provider is included in export file filters.

C#
bool CanExport { get; }

Gets whether this provider is included in import file filters.

C#
bool CanImport { get; }

Gets the description shown with this provider's extensions in file-selection filters.

C#
string FilesDescription { get; }

Gets the identifier used to register and look up this provider.

C#
string Name { get; }

Gets the supported file extensions, including the leading period used by extension lookup.

C#
IEnumerable<string> SupportedExtensions { get; }

Methods

Exports a document in this provider's format to a stream.

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

The document to export.

outputStream

The destination stream for the formatted data.

Exports a document in this provider's format to a byte array.

C#
byte[] Export(RadDocument document)
Parameters:documentRadDocument

The document to export.

Returns:

byte[]

The formatted document data.

Imports provider-format data from a byte array into a document.

C#
RadDocument Import(byte[] input)
Parameters:inputbyte[]

The byte array containing the formatted document data.

Returns:

RadDocument

The imported document.

Imports provider-format data from a stream into a document.

C#
RadDocument Import(Stream input)
Parameters:inputStream

The stream containing the formatted document data.

Returns:

RadDocument

The imported document.