Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

Field Interface

Represents a field in the document.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.1.Core.dll

Declaration

[ComVisible(true)]
public interface Field

The following members return Field objects:

Library Related API Members
WinForms Controls SnapEntity.Field
Office File API Field.Parent
FieldCollection.Create(DocumentPosition, String)
FieldCollection.Create(DocumentRange)

Remarks

A field is a set of codes that instructs a RichEditControl to insert text or graphics into a document automatically. The text or graphics inserted into a document when a control processes a field’s codes is the field result for that field. The action of processing a field’s codes to obtain a field result is called a field update.

A field in the document consists of two ranges - the Field.CodeRange and the Field.ResultRange. The total range that the field occupies is obtained via the Field.Range property.

In the document, either field codes or the field result can be displayed. Use the Field.ShowCodes method to display codes. The Field.Update method calculates and displays the result. You can also use the following commands to display field codes or results: the ToggleFieldCodesCommand command, the ToggleViewMergedDataCommand command, the ShowAllFieldCodesCommand command, ShowAllFieldResultsCommand command.

The fields in the document can be highlighted. Use the RichEditControlOptionsBase.Fields property to specify the color and highlighting mode.

All fields in the document are contained in the FieldCollection, accessible via the SubDocument.Fields property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Field interface.

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.

See Also