Implementing .NET MAUI Masked Entry
The Syncfusion .NET MAUI Masked Entry (SfMaskedEntry) is an advanced input control that restricts and formats user input using customizable mask patterns. It provides automatic validation, formatting, and visual feedback for structured data entry like phone numbers, dates, emails, product keys, and more.
When to Use This Skill
Use this skill when users need to:
- Formatted Input Fields: Phone numbers, dates, times, SSN, credit cards, ZIP codes, product keys
- Restricted Character Entry: Only accept specific characters (digits, letters, alphanumeric)
- Pattern Validation: Validate input against fixed or variable-length patterns
- Automatic Formatting: Apply separators, delimiters, and formatting as user types
- Culture-Specific Input: Handle currency symbols, date/time separators, decimal formats
- Password Fields with Masking: Show/hide characters with customizable delay
- Email and URL Validation: Use RegEx patterns for complex validation
- Data Entry Forms: Improve UX with guided input and instant feedback
- Accessibility Requirements: Provide clear input expectations with prompts and validation
Component Overview
Key Capabilities:
- Two mask types: Simple (fixed patterns) and RegEx (flexible patterns)
- Customizable prompt characters showing expected input positions
- Flexible value formatting (include/exclude prompts and literals)
- Real-time validation with multiple validation modes
- Rich event system for monitoring and controlling input
- Extensive customization (colors, fonts, borders, clear button)
- Culture support for international formats
- Password masking with visibility control
- Modern Liquid Glass effect integration
- Full accessibility and automation support
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installation and NuGet package setup
- Handler registration in MauiProgram.cs
- Basic MaskedEntry implementation
- Setting mask patterns and types
- Configuring prompt characters
- Setting and retrieving values
- First working example
Mask Types and Patterns
📄 Read: references/mask-types.md
- Simple mask type and elements (0, 9, #, L, ?, C, A, <, >)
- RegEx mask type and patterns
- Complete element reference tables
- Examples: phone numbers, dates, emails, product keys
- Case conversion and special characters
- When to use Simple vs RegEx
- Performance considerations
Value Formatting and Display
📄 Read: references/value-formatting.md
- ValueMaskFormat options
- ExcludePromptAndLiterals (typed only)
- IncludePrompt (with prompt chars)
- IncludeLiterals (with separators)
- IncludePromptAndLiterals (all characters)
- Use cases for data storage vs display
- Visual comparisons and examples
Validation and Events
📄 Read: references/validation-and-events.md
- ValidationMode (KeyPress, LostFocus)
- HasError property for validation status
- Focused/Unfocused events
- Focus() and Unfocus() methods
- ValueChanging event (cancelable, with IsValid, NewValue, OldValue, Cancel)
- ValueChanged event (with IsMaskCompleted)
- Completed event (return key)
- ClearButtonClicked event
- Event lifecycle and best practices
Customization and Styling
📄 Read: references/customization.md
- Clear button configuration (visibility, color, custom path)
- Font properties (size, attributes, family)
- Text and placeholder styling
- Border customization (stroke, visibility)
- Background and transparency
- Cursor position control
- Keyboard configuration
- SelectAllOnFocus behavior
- IsReadOnly mode
- Return key handling (ReturnType, ReturnCommand)
- AutomationId support for UI testing
- Platform-specific considerations
Advanced Features
📄 Read: references/advanced-features.md
- Culture support (currency, date/time separators, decimal/group separators)
- HidePromptOnLeave for cleaner UI
- Password masking (PasswordChar, PasswordDelayDuration)
- Liquid Glass Effect integration
- RTL support
- Accessibility features
- Performance optimization
- Edge cases and troubleshooting
1---2name: syncfusion-maui-masked-entry3description: Implements Syncfusion .NET MAUI Masked Entry (SfMaskedEntry) control for restricted, formatted text input with mask patterns. Use when working with masked input, text masks, formatted entry, phone number input, date input with format, or validation with masks. Covers Simple masks, RegEx masks, prompt characters, and automatic formatting with validation.4---5
6# Implementing .NET MAUI Masked Entry
7
8The Syncfusion .NET MAUI Masked Entry (SfMaskedEntry) is an advanced input control that restricts and formats user input using customizable mask patterns. It provides automatic validation, formatting, and visual feedback for structured data entry like phone numbers, dates, emails, product keys, and more.
9
10## When to Use This Skill
11
12Use this skill when users need to:
13
14- **Formatted Input Fields**: Phone numbers, dates, times, SSN, credit cards, ZIP codes, product keys
15- **Restricted Character Entry**: Only accept specific characters (digits, letters, alphanumeric)
16- **Pattern Validation**: Validate input against fixed or variable-length patterns
17- **Automatic Formatting**: Apply separators, delimiters, and formatting as user types
18- **Culture-Specific Input**: Handle currency symbols, date/time separators, decimal formats
19- **Password Fields with Masking**: Show/hide characters with customizable delay
20- **Email and URL Validation**: Use RegEx patterns for complex validation
21- **Data Entry Forms**: Improve UX with guided input and instant feedback
22- **Accessibility Requirements**: Provide clear input expectations with prompts and validation
23
24## Component Overview
25
26**Key Capabilities:**
27- Two mask types: **Simple** (fixed patterns) and **RegEx** (flexible patterns)
28- Customizable prompt characters showing expected input positions
29- Flexible value formatting (include/exclude prompts and literals)
30- Real-time validation with multiple validation modes
31- Rich event system for monitoring and controlling input
32- Extensive customization (colors, fonts, borders, clear button)
33- Culture support for international formats
34- Password masking with visibility control
35- Modern Liquid Glass effect integration
36- Full accessibility and automation support
37
38## Documentation and Navigation Guide
39
40### Getting Started
41📄 **Read:** [references/getting-started.md](references/getting-started.md)
42- Installation and NuGet package setup
43- Handler registration in MauiProgram.cs
44- Basic MaskedEntry implementation
45- Setting mask patterns and types
46- Configuring prompt characters
47- Setting and retrieving values
48- First working example
49
50### Mask Types and Patterns
51📄 **Read:** [references/mask-types.md](references/mask-types.md)
52- Simple mask type and elements (0, 9, #, L, ?, C, A, <, >)
53- RegEx mask type and patterns
54- Complete element reference tables
55- Examples: phone numbers, dates, emails, product keys
56- Case conversion and special characters
57- When to use Simple vs RegEx
58- Performance considerations
59
60### Value Formatting and Display
61📄 **Read:** [references/value-formatting.md](references/value-formatting.md)
62- ValueMaskFormat options
63- ExcludePromptAndLiterals (typed only)
64- IncludePrompt (with prompt chars)
65- IncludeLiterals (with separators)
66- IncludePromptAndLiterals (all characters)
67- Use cases for data storage vs display
68- Visual comparisons and examples
69
70### Validation and Events
71📄 **Read:** [references/validation-and-events.md](references/validation-and-events.md)
72- ValidationMode (KeyPress, LostFocus)
73- HasError property for validation status
74- Focused/Unfocused events
75- Focus() and Unfocus() methods
76- ValueChanging event (cancelable, with IsValid, NewValue, OldValue, Cancel)
77- ValueChanged event (with IsMaskCompleted)
78- Completed event (return key)
79- ClearButtonClicked event
80- Event lifecycle and best practices
81
82### Customization and Styling
83📄 **Read:** [references/customization.md](references/customization.md)
84- Clear button configuration (visibility, color, custom path)
85- Font properties (size, attributes, family)
86- Text and placeholder styling
87- Border customization (stroke, visibility)
88- Background and transparency
89- Cursor position control
90- Keyboard configuration
91- SelectAllOnFocus behavior
92- IsReadOnly mode
93- Return key handling (ReturnType, ReturnCommand)
94- AutomationId support for UI testing
95- Platform-specific considerations
96
97### Advanced Features
98📄 **Read:** [references/advanced-features.md](references/advanced-features.md)
99- Culture support (currency, date/time separators, decimal/group separators)
100- HidePromptOnLeave for cleaner UI
101- Password masking (PasswordChar, PasswordDelayDuration)
102- Liquid Glass Effect integration
103- RTL support
104- Accessibility features
105- Performance optimization
106- Edge cases and troubleshooting
107