All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

NumericMaskOptions.ValueAfterDelete Attached Property

Specifies whether the editor sets the 0 (zero) or null value after the last digit is removed. This is an attached property.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v20.2.dll

Declaration

Returns

Type Description
ValueAfterDeleteMode

A value the editor sets after the last digit is removed.

Remarks

The ValueAfterDelete property is in effect only when the editor can accept null as its EditValue (see the AllowNullInput property).

ValueAfterDelete = "ZeroThenNull"

<dxe:TextEdit Mask="d" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="10" 
              AllowNullInput="True" dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"/> 

When a user removes the last digit, the editor value becomes 0 (zero). If a user presses the Backspace or Delete key to remove this zero, the editor value becomes null.

If a user has cleared an entire value (the user presses Ctrl+Del, or selects and removes the entire text), the editor value becomes null immediately.

ValueAfterDelete = "Null"

<dxe:TextEdit Mask="d" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="10" 
              AllowNullInput="True" dxe:NumericMaskOptions.ValueAfterDelete="Null"/> 

When a user removes the last digit, the editor value becomes null.

NOTE

If the editor mask has only hash metacharacters (for example, "####"), it appears empty as soon as a user removes the last digit. However, if the ValueAfterDelete value is ZeroThenNull, the underlying editor's EditValue is still 0. A user must press Ctrl+Del to completely clear the editor and set its EditValue to null.

See Also