Skip to main content
A newer version of this page is available. .
All docs
V20.2

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.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Core, 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