.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

Field.ShowCodes Property

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

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

bool ShowCodes { get; set; }
Property ShowCodes As Boolean
bool ShowCodes { get; set; }
Property ShowCodes As Boolean
bool ShowCodes { get; set; }
Property ShowCodes As Boolean

Property Value

Type Description
Boolean

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

Property Value

Type Description
Boolean

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

Property Value

Type Description
Boolean

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

Remarks

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