Back to Devexpress

BeforeImportEventArgs.DocumentFormat Property

officefileapi-devexpress-dot-xtrarichedit-dot-beforeimporteventargs.md

latest2.6 KB
Original Source

BeforeImportEventArgs.DocumentFormat Property

Gets the format of the document being loaded.

Namespace : DevExpress.XtraRichEdit

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
public DocumentFormat DocumentFormat { get; }
vb
Public ReadOnly Property DocumentFormat As DocumentFormat

Property Value

TypeDescription
DocumentFormat

A DocumentFormat enumeration value.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DocumentFormat 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.

word-document-api-examples/CS/CodeExamples/ImportActions.cs#L41

csharp
// Specify the encoding before plain text is imported to the document.
if (e.DocumentFormat == DocumentFormat.PlainText)
{

word-document-api-examples/VB/CodeExamples/ImportActions.vb#L39

vb
' Specify the encoding before plain text is imported to the document.
If e.DocumentFormat = DevExpress.XtraRichEdit.DocumentFormat.PlainText Then
    CType(e.Options, DevExpress.XtraRichEdit.Import.PlainTextDocumentImporterOptions).Encoding = System.Text.Encoding.GetEncoding(20866)

See Also

BeforeImportEventArgs Class

BeforeImportEventArgs Members

DevExpress.XtraRichEdit Namespace