Articles in this section
Category / Section

How to set customized currency symbol in Xamarin.Forms numeric controls?

1 min read

The numeric text box or numeric up-down controls can have a custom string in its value. It can be specified by setting the “FormatString” property.

Setting the custom string

Change the ‘FormatString’ property of SfNumericUpDown or SfNumericTextBox with custom format string, e.g., USD 0.00. For more available custom formats, refer to this documentation.

 

Code Snippet [C#]:

 

namespace CustomCurrency_Numeric
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
….
 
SfNumericUpDown numericUpDown = new SfNumericUpDown()
{
…
 
Value = 100,
FormatString = "USD 0.00",
 
…
};
 
…
 
SfNumericTextBox numericTextBox = new SfNumericTextBox()
{
…
 
Value = 1000,
FormatString = "USD 0.00",
…
};
 
…
 
}
}
}

 

 

Code Snippet [XAML]:

 

<Grid>
…
<upDown:SfNumericUpDown Grid.Row="1" Value="100" FormatString="USD 0.00"/>
…
<textBox:SfNumericTextBox Grid.Row="3" Value="1000" FormatString="USD 0.00"/>
</Grid>

 

Output:

Custom currency format support for the numeric controls in Xamarin
Conclusion

I hope you enjoyed learning about how to set customized currency symbol in Xamarin.Forms numeric controls.

You can refer to our Xamarin Numeric control's feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications.

For current customers, you can check out our Xamarin controls from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!



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