WinForms MaskedEditBox Overview
RadMaskedEditBox is a themeable text box that formats and constrains text to a predefined pattern or a pattern you define. RadMaskedEditBox also handles globalization for date and time edits. Date and Time masks allow the user to navigate using the up and down arrow keys.
The MaskedEditBox is part of Telerik UI for WinForms, a
professional grade UI library with 160+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
Figure 1: RadMaskedEditBox Types
The MaskType property defines what type of mask would be used in the masked box:
Figure 2: MaskType Property
None
Regex: For example mask [A-z] will check for at least one symbol in this range (A-z) in RadMaskEditBox’s text:
Figure 3: Regex Mask
- IP: Allows user to input only 3 digits in 0-255 range in four groups.
Figure 4: IP Mask
- Email: Validate user input for the valid mail. If this email is not valid will notify user with validation icon:
Figure 5: Email Mask
The RegexMaskTextBoxProvider, EMailMaskTextBoxProvider, and IPMaskTextBoxProvider have an ErrorMessage property which can be set so that the displayed text with the message is localized.
Additional features supported by RadMaskedEditoBox are:
Null value support
Easy navigation between text parts of DateTimeMask