officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument.md
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
FieldCollection Fields { get; }
ReadOnly Property Fields As FieldCollection
| Type | Description |
|---|---|
| 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
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
doc.BeginUpdate();
foreach (Field f in doc.Fields) f.ShowCodes = true;
doc.EndUpdate();
how-to-use-docvariable-fields/CS/DocumentVariablesExample/Form1.cs#L129
doc.BeginUpdate();
foreach (Field f in doc.Fields) f.ShowCodes = showCodes;
doc.EndUpdate();
wpf-richedit-use-docvariable-fields/CS/MainWindow.xaml.cs#L122
doc.BeginUpdate();
foreach (Field f in doc.Fields) f.ShowCodes = showCodes;
doc.EndUpdate();
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Export.vb#L69
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
doc.BeginUpdate()
For Each f As Field In doc.Fields
f.ShowCodes = True
how-to-use-docvariable-fields/VB/DocumentVariablesExample/Form1.vb#L123
doc.BeginUpdate()
For Each f As Field In doc.Fields
f.ShowCodes = showCodes
wpf-richedit-use-docvariable-fields/VB/MainWindow.xaml.vb#L116
doc.BeginUpdate()
For Each f As Field In doc.Fields
f.ShowCodes = showCodes
See Also