.NET MAUI Masked Entry - A Custom Mask Input Control
- Easily mask input values.
- Use simple or regex masking types with either a fixed or variable length.
- Format input values with prompts, literals, or both.
Trusted by the world’s leading companies
Overview
The .NET MAUI Masked Entry is an advanced input control that restricts user input to certain characters using a mask pattern. This control is used to create templates for providing information such as telephone numbers, email IDs, IP addresses, and product keys.
.NET MAUI Masked Entry Code Example
Easily get started with the .NET MAUI Masked Entry using a few simple lines of XAML and C# code example as demonstrated below. Also explore our .NET MAUI Masked Entry Example that shows you how to render and configure the .NET MAUI Masked Entry.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
x:Class="GettingStarted.MainPage">
<ContentPage.Content>
<VerticalStackLayout>
<syncfusion:SfMaskedEntry WidthRequest="200"
MaskType="Simple"
Mask="00/00/0000"
Value="12/02/2022" />
</VerticalStackLayout>
</ContentPage.Content>
</ContentPage>using Syncfusion.Maui.Inputs;
namespace SfButtonSample
{
public partial class MainPage : ContentPage
{
SfMaskedEntry maskedEntry;
public MainPage()
{
InitializeComponent();
maskedEntry = new SfMaskedEntry();
maskedEntry.WidthRequest = "200";
maskedEntry.MaskType = MaskedEntryMaskType.Simple;
maskedEntry.Mask = "00/00/0000";
maskedEntry.Value = "12/02/2022";
VerticalStackLayout layout = new VerticalStackLayout();
stackLayout.Children.Add(maskedEntry.Value);
this.Content = layout;
}
}
}Mask types
The .NET MAUI Masked Entry control provides two types of masks: simple and regex. Each has a different set of mask elements that are combined to form a mask expression.

Simple mask
Generate expressions with very simple mask elements. This is mainly used for fixed-length inputs.

Regex mask
Use regular expression, or regex, masks to create more complex expressions with varying lengths for input data.
Validation mode
This features allows users to specify when to validate the data input, either on every key press or when the control loses focus.

Formatting values
Format input values with literals and prompt characters to guide the user in entering the appropriate input.

Exclude prompts and literals
Set up the .NET MAUI Masked Entry to exclude prompt and literal characters, preserving only the typed characters.

Include prompts and literals
Keep typed characters, prompt characters, and literals intact for clear user input guidance and readability.

Include prompts
Set up the .NET MAUI Masked Entry to preserve typed and prompt characters, excluding literals.

Include literals
Keep typed and literal characters in the input, but exclude prompt characters.
Culture
Special symbols like currency symbols, date separators, decimal separators, and others are applied based on the specified culture.

Not sure how to create your first .NET MAUI Masked Entry? Our tutorial videos and documentation can help.
I’d love to watch it now I’d love to read it nowFrequently Asked Questions
Why should you choose the Syncfusion® .NET MAUI Masked Entry?
The Syncfusion® .NET MAUI Masked Entry supports the following features:
Mask the input with a fixed or variable length by setting the mask type to simple or regex.
- Customize the prompt characters used to set the default characters as input in the absence of input.
- Enter values and clipboard operations in the control based on the Value Mask Format.
Set formatted values in the control using mask format values such as prompt, literals, or both.
- Customize the UI of the masked text box.
- One of the best .NET MAUI Masked Entry in the market, offering feature-rich UI to interact with the software.
Simple configuration and APIs.
- Mobile-touch friendly.
Extensive demos, and documentation to let you get started quickly with the .NET MAUI Masked Entry.
Where can I find the Syncfusion® .NET MAUI Masked Entry demo?
You can find our .NET MAUI Masked Entry demo, which demonstrates how to render and configure the Masked Entry.
Can I download and utilize the Syncfusion® .NET MAUI Masked Entry for free?
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.
How do I get started with Syncfusion® .NET MAUI Masked Entry?
A good place to start would be our comprehensive getting started documentation.
.NET MAUI DataViz & UI Controls
Our Customers Love Us
Awards
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.