officefileapi-devexpress-dot-xtrarichedit-dot-beforeimporteventargs.md
Gets the format of the document being loaded.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
public DocumentFormat DocumentFormat { get; }
Public ReadOnly Property DocumentFormat As DocumentFormat
| Type | Description |
|---|---|
| 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
// 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
' 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