Skip to main content
All docs
V25.1
  • DxNumericMaskProperties.AlwaysShowDecimalSeparator Property

    Specifies whether to show the decimal separator (even if the fractional part is zero).

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(true)]
    [Parameter]
    public bool AlwaysShowDecimalSeparator { get; set; }

    Property Value

    Type Default Description
    Boolean true

    true to show the separator even if the fractional part is zero; otherwise, false.

    Remarks

    Set the AlwaysShowDecimalSeparator property to false to hide the decimal separator when the fractional part is zero.

    <DxSpinEdit @bind-Value="@Price"
                Mask="##0.##">
        <DxNumericMaskProperties AlwaysShowDecimalSeparator=false />
    </DxSpinEdit>
    
    @code {
        Double Price { get; set; } = 123.00;
    }
    

    SpinEdit Separator

    Note that the decimal separator (.) is hidden only if the specified mask allows it. For example, if the mask is ###.00 and AlwaysShowDecimalSeparator is false, the decimal separator (.) is shown.

    <DxSpinEdit @bind-Value="@Price"
                DisplayFormat="###.00"
                Mask="###.00">
        <DxNumericMaskProperties AlwaysShowDecimalSeparator=false/>
    </DxSpinEdit>
    
    @code {
        Double Price { get; set; } = 123.00;
    }
    

    SpinEdit Show Separator

    If you set the AlwaysShowDecimalSeparator property to false, a user still can enter values with the separator, for example, 123.00. However, the separator is hidden when the editor loses focus.

    SpinEdit Show Separator

    See Also