Back to Devexpress

DocumentFormat.PlainText Field

officefileapi-devexpress-dot-xtrarichedit-dot-documentformat-83669ee7.md

latest5.6 KB
Original Source

DocumentFormat.PlainText Field

The plain text format.

Namespace : DevExpress.XtraRichEdit

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
public static readonly DocumentFormat PlainText
vb
Public Shared ReadOnly PlainText As DocumentFormat

Field Value

TypeDescription
DocumentFormat

A document format.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the PlainText field.

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-automatic-document-conversion-on-web-server/CS/Program.cs#L48

csharp
dictF.Add(DocumentFormat.Rtf, "rtf");
dictF.Add(DocumentFormat.PlainText, "txt");
dictF.Add(DocumentFormat.Doc, "doc");

syntax-highlighting-for-c-and-vb-code-using-devexpress-codeparser-and-syntax-highlight-tokens/CS/SyntaxHighlightSimple/MainWindow.xaml.cs#L33

csharp
string path = "MainWindow.xaml.cs";
    richEditControl1.LoadDocument(path, DocumentFormat.PlainText);
}

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Range.cs#L67

csharp
document.Copy(myRange);
document.Paste(DocumentFormat.PlainText);
#endregion #CopyAndPasteRange

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/RangeActions.cs#L67

csharp
document.Copy(myRange);
document.Paste(DocumentFormat.PlainText);
#endregion #CopyAndPasteRange

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-automatic-document-conversion-on-web-server/VB/Program.vb#L43

vb
dictF.Add(DocumentFormat.Rtf, "rtf")
dictF.Add(DocumentFormat.PlainText, "txt")
dictF.Add(DocumentFormat.Doc, "doc")

syntax-highlighting-for-c-and-vb-code-using-devexpress-codeparser-and-syntax-highlight-tokens/VB/SyntaxHighlightSimple/MainWindow.xaml.vb#L31

vb
Dim path As String = "MainWindow.xaml.cs"
    Me.richEditControl1.LoadDocument(path, DocumentFormat.PlainText)
End Sub

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Range.vb#L62

vb
document.Copy(myRange)
            document.Paste(DevExpress.XtraRichEdit.DocumentFormat.PlainText)
#End Region ' #CopyAndPasteRange

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/RangeActions.vb#L60

vb
document.Copy(myRange)
            document.Paste(DocumentFormat.PlainText)
' #End Region ' #CopyAndPasteRange

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

DocumentFormat Struct

DocumentFormat Members

DevExpress.XtraRichEdit Namespace