Value

To set a predefined value inside the MaskedEntry, define the Value(string) property. It returns the user input without the formatting characters.

RadTextMaskedEntry with Value property

<telerik:RadTextMaskedEntry x:Name="textMaskedEntry" Mask="aaaa" Value="ABCD"/>
this.textMaskedEntry.Value = "Test";

Add the namespace:

xmlns:telerik="clr-namespace:Telerik.Maui.Controls;assembly=Telerik.Maui.Controls"

Null Value Support

By default, the MaskedEntry control doesn't allow you to set null to its Value property. Instead, the null value in the NumericMaskedEntry is coerced to 0. To allow null values, you have to set the AllowNullValue property to True.

RadNumericMaskedEntry with null value support

<telerik:RadNumericMaskedEntry x:Name="allowNullValuesTextMaskedEntry" Value="5"  AllowNullValue="True"/>

Add the namespace:

xmlns:telerik="clr-namespace:Telerik.Maui.Controls;assembly=Telerik.Maui.Controls"

For the AllowNullValues example, refer to the MaskedEntry/Features folder of the SDK .NET MAUI Application.

See Also

In this article
Not finding the help you need?