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.
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;
}
}
}
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.
Generate expressions with very simple mask elements. This is mainly used for fixed-length inputs.
Use regular expression, or regex, masks to create more complex expressions with varying lengths for input data.
This features allows users to specify when to validate the data input, either on every key press or when the control loses focus.
Format input values with literals and prompt characters to guide the user in entering the appropriate input.
Set up the .NET MAUI Masked Entry to exclude prompt and literal characters, preserving only the typed characters.
Maintain typed, prompt, and literal characters in the input.
Set up the .NET MAUI Masked Entry to preserve typed and prompt characters, excluding literals.
Keep typed and literal characters in the input, but exclude prompt characters.
Special symbols like currency symbols, date separators, decimal separators, and others are applied based on the specified culture.
The Syncfusion .NET MAUI Masked Entry supports the following features:
You can find our .NET MAUI Masked Entry demo, which demonstrates how to render and configure the Masked Entry.
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.
A good place to start would be our comprehensive getting started documentation.
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.