Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

NumericMaskOptions.HideInsignificantZeros Attached Property

Gets or sets whether the editor hides “0“ (zero) when all digits are removed. This is an attached property.

Namespace: DevExpress.Xpf.Editors

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

#Returns

Type Description
Boolean

true to show nothing when all digits are removed;

false to show “0“ (zero) when all digits are removed.

#Remarks

The HideInsignificantZeros property has effect only for:

  • masks that consist solely of the “#“ metacharacter (for example, “###“);
  • mask segments that consist solely of the “#“ metacharacter (for example, “###.##“).

#HideInsignificantZeros = “True”

<dxe:TextEdit Mask="###" MaskType="Numeric" MaskUseAsDisplayFormat="True" 
              EditValue="123" dxe:NumericMaskOptions.HideInsignificantZeros="True"/> 

When a user removes the last editor digit, the editor shows nothing. However, its EditValue is “0“ (not null or String.Empty).

#HideInsignificantZeros = “False”

<dxe:TextEdit Mask="###" MaskType="Numeric" MaskUseAsDisplayFormat="True" 
              EditValue="123" dxe:NumericMaskOptions.HideInsignificantZeros="False"/> 

When a user removes the last editor digit, the editor shows “0“ and the EditValue is 0. If the ValueAfterDelete property is Null, the editor shows nothing and its EditValue is null. In either case, the editor shows value that matches its underlying data.

See Also