[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Collapse]Data Editors
   [Expand]Product Information
   [Collapse]Common Concepts
    [Expand]Binding to Data
    [Collapse]Mask Editing
      Mask Editing Overview
      Mask Types
      Keyboard Support in Mask Parts
      Mask Hints
    [Expand]List Editors
     Accessibility Support
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Mask Types

A mask can consist of several parts. The following part types are available:

  • Prompts

    A prompt specifier represents a single symbol. During editing, prompt specifiers are represented within the edit box using a placeholder character defined via the MaskSettings.PromptChar property.

    A, a - Alphanumeric
    L, l - Alphabetic
    C, c - Any char

    Specifiers in upper case require that a prompt should be filled. If such a prompt is left empty - the mask will not be valid.

    > - Converts all symbols to the right to upper case
    < - Converts all symbols to the right to lower case
    ~ - Cancels effect of the "<" or ">" symbol

    # - Optional digit or signum symbol
    9 - Optional digit
    0 - Required digit
  • Culture dependent separators

    Standard culture dependent separators are allowed, such as $ : / , . and etc.
  • Ranges

    The range mask type lets you define a range of allowable integer values by specifying the minimum and maximum limits. You can define a range's default value, allow zero-filling, and control whether a culture dependent thousand separator is automatically displayed. This mask type supports displaying mask hints.

    <0..50..100> - With default value
    <00..100>, <01..31> - Zero-filling is enabled
    <0..9999g> - Thousand separator is added automatically (the separator is specified by the current culture)
  • Enumerations

    Using this mask type, you can define a collection of allowable string values and specify the default value, if required. This mask type supports displaying mask hints.

    <A|*B|C> - With default value

    Use the MaskSettings.AllowEscapingInEnums property to control whether a backslash symbol (\) and quotes (single ' ' and double " ") can be used as escape characters in enumeration masks to solve the problem of using special characters inside a mask string.

  • Date-time specifiers

    Standard and custom date-time specifiers are allowed, such as 'd', 'dd MM yyyy' and so on.
  • Literals

    Literal symbols are typically used within mask expressions to group or separate different mask parts (such as parentheses in phone numbers or dashes in serial numbers, for instance) or for informative purposes. The following are considered as literals:

    - Symbols not specified above
    - A symbol preceded by a backslash '\'
    - A group of symbols wrapped with quotation marks ("$ : / , .") or apostrophes ('$ : / , .')

    Use the MaskSettings.IncludeLiterals property to control which kinds of literal symbols composing a mask should be included into an editor's value.

Expanded See Also

Is this topic helpful?​​​​​​​