How to format display text as currency in UWP Editor -NumericUpDown?
To format a display text in various format in SfNumericUpDown control, the FormatString property can be used. The following code snippet shows how to set the format string in currency format
Code Snippet
XAML Code
<Grid x:Name="Grid1" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<syncfusion:SfNumericUpDown x:Name="numericUpDown" Width="250" FormatString="C"
Value="123.45">
</syncfusion:SfNumericUpDown>
</Grid>
C# Code
namespace SfNumericTextBox_sample { /// <summary> /// An empty page that can be used on its own or navigated to within a Frame. /// </summary> public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent(); SfNumericUpDown numericupdown = new SfNumericUpDown(); numericupdown.Width = 250; numericupdown.FormatString = "C"; numericupdown.Value = 123.45; Grid1.Children.Add(numericupdown); } } } |
Output:
Conclusion
I hope you enjoyed learning how to format the display text as currency in SfNumericUpDown
You can refer to our UWP NUmericUpdown feature tour page to know about its other groundbreaking feature representations. You can also explore our documentation to understand how to present and manipulate data.
For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our ASP.NET MVC Chart and other ASP.NET MVC components.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!