Articles in this section
Category / Section

How to set culture type in a .NET MAUI Masked Entry control?

2 mins read

This section explains how to set the culture type for the .NET MAUI Masked Entry control in a .NET MAUI application. By configuring the Culture property with a specific CultureInfo object, you ensure that the control uses the desired culture type for formatting and input.

Step 1: XAML Setup
Create the Masked Entry control in the XAML markup and configure it with the required properties.

XAML

<syncfusion:SfMaskedEntry x:Name="maskedEntry" 
                          WidthRequest="150" 
                          HeightRequest="50"  
                          Mask="$ 0,000.00"/>

Step 2: C#
Access the Culture property of the Masked Entry control named maskedEntry in the C# code-behind. Assign a CultureInfo object with the desired culture code, such as “en-IN”, to the Culture property. Replace “en-IN” with the appropriate culture code according to your application’s requirements.

public MainPage()
{
	InitializeComponent();       
        maskedEntry.Culture = new CultureInfo("en-IN");
}

Output

Screenshot 2023-09-04 115655.png

Conclusion

I hope you enjoyed learning how to set the culture type in a .NET MAUI Masked Entry control.
For more information on the .NET MAUI Masked Entry feature tour and documentation, including getting started guides and configuration specifications, feel free to explore further.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to explore our other controls.
Please let us know in the comments section below if you have any queries or require clarification. You can also contact us through our support forums, Direct-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