Version

Mask Property

Returns or sets the mask associated with the masked edit control.
Syntax
'Declaration
 
Public Property Mask As String
public string Mask {get; set;}
Remarks

When a mask is defined, placeholders are defined by the PromptChar property. When inputting data, the user can only replace a placeholder with a character that is of the same type as the one specified in the mask. If the user enters an invalid character, the control rejects the character and generates the XamMaskedEditor.InvalidChar event. The control can distinguish between numeric and alphabetic characters for validation, as well as validate for valid content for certain types like, date or time or numeric types such as the correct month or time of day etc...

For a complete list of the various mask tokens as well as examples please refer to Masks topic.

Note: When specifying the mask from within XAML and using one of the special tokens that are enclosed within {}, you must preceed the mask with {} - e.g. {}{date}.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also