syncfusion-maui-masked-entry

$npx mdskill add syncfusion/maui-ui-components-skills/syncfusion-maui-masked-entry

Restricts and formats text input using customizable mask patterns.

  • Enables formatted input for phone numbers, dates, and product keys.
  • Depends on Syncfusion .NET MAUI SfMaskedEntry control.
  • Applies mask patterns or RegEx to validate and format input.
  • Returns formatted and validated text with visual feedback.

SKILL.md

.github/skills/syncfusion-maui-masked-entryView on GitHub ↗
---
name: syncfusion-maui-masked-entry
description: 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.
metadata:
  author: "Syncfusion Inc"
  version: "34.1.29"
---

# 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](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](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](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](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](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](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

More from syncfusion/maui-ui-components-skills

SkillDescription
syncfusion-maui-accordionImplements Syncfusion .NET MAUI Accordion (SfAccordion) - a vertically collapsible panel with stacked headers for expanding/collapsing content. Use when working with accordions, collapsible panels, expandable lists, employee lists with details, or FAQ sections in .NET MAUI applications. Covers AccordionItem configuration, expand modes, and grouped content display.
syncfusion-maui-ai-assistviewImplements Syncfusion .NET MAUI AI AssistView (SfAIAssistView) for AI-powered interactive chat interfaces. Use when working with AI chat interfaces, AI AssistView, SfAIAssistView, conversational UI, or chat with AI responses. Covers integrating AI services, creating chat UIs, implementing conversation flows, managing AI requests/responses, and displaying AI suggestions.
syncfusion-maui-autocompleteImplements and configure Syncfusion .NET MAUI Autocomplete (SfAutocomplete) control for intelligent text input with suggestions. Use when implementing autocomplete, autosuggest, type-ahead search, smart search, or filtered dropdowns in .NET MAUI applications. Covers data binding, filtering modes, custom search logic, AI-powered search, multi-selection with tokens, and UI customization.
syncfusion-maui-avatar-viewImplements Syncfusion .NET MAUI Avatar View (SfAvatarView) for displaying user profile pictures, initials, or group avatars. Use when working with avatar views, profile pictures, user images, initials display, profile icons, or contact images. Ideal for implementing user profile displays, contact lists, chat interfaces, or social feeds.
syncfusion-maui-backdropImplements Syncfusion .NET MAUI Backdrop Page (SfBackdropPage) with back layer and front layer surfaces. Use when working with backdrop pages, SfBackdropPage, back layer, front layer, or reveal/conceal animations. Covers backdrop navigation patterns, header icons, corner shapes, reveal height, layer state events, and liquid glass effect.
syncfusion-maui-badge-viewImplements Syncfusion .NET MAUI Badge View (SfBadgeView) control. Use when adding badge notifications, status indicators, unread counts, or notification overlays to MAUI applications. Covers SfBadgeView setup, badge text customization, position adjustments, animations, predefined symbols, and accessibility features.
syncfusion-maui-barcode-generatorImplements Syncfusion .NET MAUI Barcode Generator (SfBarcodeGenerator) for generating machine-readable barcodes. Use when working with barcodes, barcode generation, QR codes, data matrix, EAN codes, UPC codes, Code128, or Code39. This skill covers both one-dimensional (linear) and two-dimensional (matrix) barcode symbologies with extensive customization options.
syncfusion-maui-busy-indicatorImplements Syncfusion .NET MAUI Busy Indicator (SfBusyIndicator) for showing loading states, data processing, and app activity indicators. Use when displaying loading indicators, busy animations, activity spinners, or processing feedback in .NET MAUI apps. Covers busy indicator setup, animations, and visual feedback during long-running operations.
syncfusion-maui-buttonImplements and customize Syncfusion .NET MAUI Button (SfButton) control. Use when working with MAUI buttons, SfButton implementation, button customization, or visual states. Covers button icons, background images, RTL support, Liquid Glass effects, custom button views, button styling, events, and checkable buttons.
syncfusion-maui-calendarImplements and customize Syncfusion .NET MAUI Calendar (SfCalendar) control. Use when implementing calendar functionality, date selection (single, multiple, range), or calendar views (month, year, decade, century). Covers date restrictions (min/max dates, EnablePastDates, SelectableDayPredicate), calendar customization, events (ViewChanged, SelectionChanged, Tapped), and header/footer customization.