What Changed
In our previous versions, editors with numeric masks replaced the last removed digit with 0
when a user pressed Backspace and AllowNullInput was set to true
.
XAML<dxe:TextEdit AllowNullInput="True" Mask="d" MaskType="Numeric" />
In v20.2 and newer, editors clear their values immediately:
Reasons for the Change
Previously users had to press Backspace twice to clear an editor with a single digit, and we received many complaints in support tickets. We decided to implement an option that allows you to clear a value faster, and we enabled this option by default.
How to Revert to Previous Behavior
To return to the previous behavior in a single editor, set the attached NumericMaskOptions.ValueAfterDelete property to ValueAfterDeleteMode.ZeroThenNull
.
XAML<dxe:TextEdit
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
AllowNullInput="True"
Mask="d"
MaskType="Numeric" />
If you wish to return to the previous behavior in all editors, set CompatibilitySettings.ValueAfterDeleteInNumericMask to ZeroThenNull
.
C#static MainWindow() {
CompatibilitySettings.ValueAfterDeleteInNumericMask = ValueAfterDeleteMode.ZeroThenNull;
}
In this case, you can set NumericMaskOptions.ValueAfterDelete to ValueAfterDeleteMode.Null
for individual editors to enable the new mode for them.