Skip to main content
A newer version of this page is available. .

FieldOptions.ClearUnhandledDocVariableField Property

Gets or sets whether the DOCVARIABLE field value is cleared when it cannot be calculated.

Namespace: DevExpress.XtraRichEdit

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

Declaration

[DefaultValue(true)]
public bool ClearUnhandledDocVariableField { get; set; }

Property Value

Type Default Description
Boolean **true**

True, to clear the value of the DOCVARIABLE field when it either cannot be retrieved from the Document.Variables dictionary or the CalculateDocumentVariable event is not handled; otherwise, false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to ClearUnhandledDocVariableField
WinForms Controls SnapControlOptions
.Fields.ClearUnhandledDocVariableField
RichEditControlOptions
.Fields.ClearUnhandledDocVariableField
WPF Controls RichEditControlOptions
.Fields.ClearUnhandledDocVariableField
Office File API RichEditControlOptionsBase
.Fields.ClearUnhandledDocVariableField

Remarks

When the Document.CalculateDocumentVariable event is not handled and a key-value pair for the DOCVARIABLE field is not found in the Document.Variables dictionary, the field value cannot be calculated. In this situation, it can be either left intact or cleared. Use the ClearUnhandledDocVariableField property to specify default action in this case.

See Also