.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Field.ShowCodes Property

Gets or sets whether to show the field’s codes.

Namespace: DevExpress.XtraRichEdit.API.Native

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


bool ShowCodes { get; set; }

Property Value

Type Description

true to show the field’s codes; otherwise, false.


This code snippet displays field codes for all fields in the main document body.

The fields containing in the header or footer belong to a different FieldCollection. Use the Section.BeginUpdateHeader- Section.EndUpdateHeader or Section.BeginUpdateFooter - Section.EndUpdateFooter paired methods to retrieve the header or footer document.

Document document = server.Document;
document.LoadDocument("MailMergeSimple.docx", DocumentFormat.OpenXml);
for (int i = 0; i < document.Fields.Count; i++)
    document.Fields[i].ShowCodes = true;
See Also