New to Telerik UI for .NET MAUIStart a free 30-day trial

.NET MAUI Text Mask

Updated on Jun 25, 2026

To validate the user input as text symbols, use the TextMaskedEntry. The resulting value is a string object.

The table below lists the mask characters that can be used with TextMaskedEntry. The characters can be set to the Mask property.

Mask CharacterDescription
0(Required) Digit. This element will accept any single digit between 0 and 9.
9(Optional) Digit or space.
#(Optional) Digit or space. If this position is blank in the mask, it will be rendered as the character in the PromptChar property. For example, "$######.##" displays as a literal "$", accepts a numeric amount with six places and two places to the right of the decimal, that is, $123456.56.
L(Required) Accepts letters only.
?(Optional) Letter.
&(Required) Character.
C(Optional) Character.
A(Required) Alphanumeric. Accepts any symbol.
a(Optional) Alphanumeric.
.Decimal placeholder.
,Thousands placeholder.
:Time separator.
/Date separator.
$Currency symbol.
<Shifts down. Converts all characters that follow to lowercase.
>Shifts up. Converts all characters that follow to uppercase.
\Disables a previous shift up or shift down.
\\Escape. Escapes a mask character, turning it into a literal. "\\" is the escape sequence for a backslash.
All other charactersAll non-mask elements will appear as themselves within RadTextMaskedEntry. Literals always occupy a static position in the mask at run time, and cannot be moved or deleted by the user.

Additional Properties

The RadTextMaskedEntry provides the following additional properties:

  • AllowOnlyCompletedValues (bool)—Defines whether only completed (valid) values are accepted. When set to True, invalid values are not accepted. When set to False, incomplete values are accepted and the ValueChanging and ValueChanged events are raised.
  • RestrictToAscii (bool)—Defines whether the input is restricted to ASCII characters only.

Example

The following example demonstrates how to create a RadTextMaskedEntry:

XAML
<telerik:RadTextMaskedEntry x:Name="textMaskedEntry" Mask="aaaaaaaaaaaaaaaaaaaa" AutomationId="textMask" />

The image below shows the end result.

.NET MAUI TextMaskedEntry

For the MaskedEntry Text Mask examples, go to the SDKBrowser Demo Application and navigate to MaskedEntry -> Mask Types category.

See Also