Back to Devexpress

SubDocument.Fields Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument.md

latest4.6 KB
Original Source

SubDocument.Fields Property

Provides access to the collection of fields in the current document.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
FieldCollection Fields { get; }
vb
ReadOnly Property Fields As FieldCollection

Property Value

TypeDescription
FieldCollection

A FieldCollection object representing a collection of fields.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Fields 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.

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Export.cs#L78

csharp
foreach (Field item in document.Fields) {
    string fieldCode = document.GetText(item.CodeRange);

winforms-richedit-use-calculatedocumentvariable-event-to-insert-formatted-content/CS/Form1.cs#L63

csharp
doc.BeginUpdate();
foreach (Field f in doc.Fields) f.ShowCodes = true;
doc.EndUpdate();

how-to-use-docvariable-fields/CS/DocumentVariablesExample/Form1.cs#L129

csharp
doc.BeginUpdate();
foreach (Field f in doc.Fields) f.ShowCodes = showCodes;
doc.EndUpdate();

wpf-richedit-use-docvariable-fields/CS/MainWindow.xaml.cs#L122

csharp
doc.BeginUpdate();
foreach (Field f in doc.Fields) f.ShowCodes = showCodes;
doc.EndUpdate();

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Export.vb#L69

vb
Dim plainText As String = System.[String].Empty
For Each item As DevExpress.XtraRichEdit.API.Native.Field In document.Fields
    Dim fieldCode As String = document.GetText(item.CodeRange)

winforms-richedit-use-calculatedocumentvariable-event-to-insert-formatted-content/VB/Form1.vb#L49

vb
doc.BeginUpdate()
For Each f As Field In doc.Fields
    f.ShowCodes = True

how-to-use-docvariable-fields/VB/DocumentVariablesExample/Form1.vb#L123

vb
doc.BeginUpdate()
For Each f As Field In doc.Fields
    f.ShowCodes = showCodes

wpf-richedit-use-docvariable-fields/VB/MainWindow.xaml.vb#L116

vb
doc.BeginUpdate()
For Each f As Field In doc.Fields
    f.ShowCodes = showCodes

See Also

SubDocument Interface

SubDocument Members

DevExpress.XtraRichEdit.API.Native Namespace