.NET MAUI MaskedEntry Globalization
Globalization refers to developing an application in such a way that it works with respect to the target device culture. This includes number formatting which can vary between cultures, especially for some specific symbols, such as decimal separators, currency and other.
The Telerik UI for .NET MAUI NumericMaskedEntry control supports globalization.
Globalization Example with NumericMaskedEntry
Define the NumericMaskedEntry
in XAML:
<Label Text="Culture = default" Margin="0, 30, 0, 0" />
<telerik:RadNumericMaskedEntry Mask="C" AutomationId="numericMask"/>
<Label Text="Culture = de-DE" Margin="0, 30, 0, 0" />
<telerik:RadNumericMaskedEntry x:Name="germanCultureMask" Mask="C" AutomationId="numericMaskDE"/>
<Label Text="Culture = bg-BG" Margin="0, 30, 0, 0" />
<telerik:RadNumericMaskedEntry x:Name="bulgarianCultureMask" Mask="C" AutomationId="numericMaskBG"/>
Set the desired culture in code-behind:
this.germanCultureMask.Culture = new System.Globalization.CultureInfo("de-DE");
this.bulgarianCultureMask.Culture = new System.Globalization.CultureInfo("bg-BG");
Add the namespace:
xmlns:telerik="clr-namespace:Telerik.Maui.Controls;assembly=Telerik.Maui.Controls"
For the MaskedEntry Culture example, go to the SDKBrowser Demo Application and navigate to MaskedEntry -> Features category.