NumericMaskAttribute.AlwaysShowDecimalSeparator Property
Gets or sets whether to display the decimal separator even if the fractional part is zero.
Namespace: DevExpress.Mvvm.DataAnnotations
Assembly: DevExpress.Mvvm.v24.1.dll
NuGet Packages: DevExpress.Mvvm, DevExpress.Win.Navigation
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | false |
|
Remarks
The AlwaysShowDecimalSeparator
property has a lower priority than the applied mask. For example, if the AlwaysShowDecimalSeparator
property is set to false
and the mask is set to ##.00
, the decimal separator is always displayed.
The following code sample demonstrates how to use the AlwaysShowDecimalSeparator
property:
using DevExpress.Mvvm.DataAnnotations;
// ...
public class DataItem {
public int Id { get; set; }
[NumericMask(UseAsDisplayFormat = true, AlwaysShowDecimalSeparator = true)]
public double ShowDecimalSeparator { get; set; }
[NumericMask(UseAsDisplayFormat = true, AlwaysShowDecimalSeparator = false)]
public double HideDecimalSeparator { get; set; }
}
See Also