Articles in this section
Category / Section

How to truncate the trailing zero's in Xamarin.Forms numeric control (SfNumericTextBox)

1 min read

This section explains how to remove the trailing zero's in Xamarin.Forms NumericTextBox. It has been achieved by setting the Format String property, as shown in the following code snippet.

 

[XAML]

<StackLayout Margin="10,30,10,10">
        <numeric:SfNumericTextBox  x:Name="numerictextbox" 
                                   MaximumNumberDecimalDigits="3"
                                   Value="7.400" 
                                   FormatString="0.##" />
</StackLayout>

 

Output

Trailing 0s in numeric controls

 

See also

 

Custom numeric format strings

 

Number of decimal digits display

 

Allowing null value

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied