Breaking Change T927230
Visible to All Users

Editors with numeric masks no longer replace the last removed symbol with 0 if AllowNullInput is set to True

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.

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.