wpf-devexpress-dot-xpf-dot-editors-dot-numericmaskoptions.md
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.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
See GetValueAfterDelete(DependencyObject) and SetValueAfterDelete(DependencyObject, ValueAfterDeleteMode).
| Type | Description |
|---|---|
| ValueAfterDeleteMode |
A value the editor sets after the last digit is removed.
|
The ValueAfterDelete property is in effect only when the editor can accept null as its EditValue (see the AllowNullInput property).
<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.
<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