New to Telerik UI for WinFormsStart a free 30-day trial

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

Definition

Namespace:Telerik.WinForms.Documents.FormatProviders.Txt

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class TxtFormatProvider : DocumentFormatProviderBase, ITextBasedDocumentFormatProvider, IDocumentFormatProvider

Inheritance: objectDocumentFormatProviderBaseTxtFormatProvider

Implements: IDocumentFormatProviderITextBasedDocumentFormatProvider

Inherited Members DocumentFormatProviderBase.Import(byte[])

Constructors

C#
public TxtFormatProvider()

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

Implements: IDocumentFormatProvider.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

Implements: IDocumentFormatProvider.CanImport

Gets the description of the supported file formats.

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

The files description.

Overrides: DocumentFormatProviderBase.FilesDescription

Implements: IDocumentFormatProvider.FilesDescription

Gets the name of the specific format provider.

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

The name.

Overrides: DocumentFormatProviderBase.Name

Implements: IDocumentFormatProvider.Name

Gets the extensions supported by this format provider.

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

The supported extensions.

Overrides: DocumentFormatProviderBase.SupportedExtensions

Implements: IDocumentFormatProvider.SupportedExtensions

Methods

Exports the specified RadDocument instance to plain text.

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

The document.

outputStream

The Stream the document should be saved into.

Overrides: DocumentFormatProviderBase.Export(RadDocument, Stream)

Implements: IDocumentFormatProvider.Export(RadDocument, Stream)

Exports the specified document to a string.

C#
public string Export(RadDocument document)
Parameters:documentRadDocument

The document.

Returns:

string

A string containing the document.

Implements: ITextBasedDocumentFormatProvider.Export(RadDocument)

Imports the specified Stream into a RadDocument instance.

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

The Stream containing the document data.

Returns:

RadDocument

The generated RadDocument instance.

Overrides: DocumentFormatProviderBase.Import(Stream)

Implements: IDocumentFormatProvider.Import(Stream)

Imports the specified string.

C#
public RadDocument Import(string input)
Parameters:inputstring

The string containing the document.

Returns:

RadDocument

The generated RadDocument instance.

Implements: ITextBasedDocumentFormatProvider.Import(string)