This project has moved and is read-only. For the latest updates, please go here.

MaskedTextBox Supported Masks

Jan 24 at 6:21 PM
Edited Jan 24 at 6:22 PM
Hi Can someone please post the table of supported mask elements to the documentation for MaskedTextBox. Thank you

WPF MaskedTextBox Control

Here they are in case anyone is looking for them in the meantime.

Supported Masks

0 Digit, required.This element will accept any single digit between 0 and 9.

9 Digit or space,optional.

# Digit or space,optional. If this position is blank in the mask, it will be rendered as aspace in the Text property. Plus (+) and minus (-) signs are allowed.

L Letter, required.Restricts input to the ASCII letters a-z and A-Z. This mask element is equivalentto [a-zA-Z] in regular expressions.

? Letter, optional.Restricts input to the ASCII letters a-z and A-Z. This mask element isequivalent to [a-zA-Z]? in regular expressions.

& Character, required.If the AsciiOnly property is set to true, this element behaves like the"L" element.

C Character, optional.Any non-control character. If the AsciiOnly property is set to true, thiselement behaves like the "?" element.

A Alphanumeric,optional. If the AsciiOnly property is set to true, the only characters itwill accept are the ASCII letters a-z and A-Z.

a Alphanumeric,optional. If the AsciiOnly property is set to true, the only characters itwill accept are the ASCII letters a-z and A-Z.

. Decimal placeholder.The actual display character used will be the decimal symbol appropriate tothe format provider, as determined by the control's FormatProvider property.

, Thousandsplaceholder. The actual display character used will be the thousandsplaceholder appropriate to the format provider, as determined by thecontrol's FormatProvider property.

: Time separator. Theactual display character used will be the time symbol appropriate to theformat provider, as determined by the control's FormatProvider property.

/ Date separator. Theactual display character used will be the date symbol appropriate to theformat provider, as determined by the control's FormatProvider property.

$ Currency symbol. Theactual character displayed will be the currency symbol appropriate to theformat provider, as determined by the control's FormatProvider property.

< Shift down. Convertsall characters that follow to lowercase

> Shift up. Convertsall characters that follow to uppercase.

\ Escape. Escapes amask character, turning it into a literal. "\" is the escapesequence for a backslash.

Disable a previousshift up or shift down.