Xceed Grid for WinForms v4.3 Documentation
Mask Property (TextEditor)


Xceed.Grid.v4.3 Assembly > Xceed.Grid.Editors Namespace > TextEditor Class : Mask Property
Gets or sets the mask applied to the editor's text.
Syntax
'Declaration
 
<DescriptionAttribute("The mask applied to the editor's text.")>
<CategoryAttribute("Appearance")>
<LocalizableAttribute(True)>
<RefreshPropertiesAttribute(RefreshProperties.Repaint)>
<EditorAttribute("Xceed.Editors.Design.MaskUIEditor,Xceed.Grid.v4.3.Design,Version=4.3.20076.12375,Culture=neutral,PublicKeyToken=ba83ff368b7563c6", System.Drawing.Design.UITypeEditor)>
Public Property Mask As String
'Usage
 
Dim instance As TextEditor
Dim value As String
 
instance.Mask = value
 
value = instance.Mask
[Description("The mask applied to the editor's text.")]
[Category("Appearance")]
[Localizable(true)]
[RefreshProperties(RefreshProperties.Repaint)]
[Editor("Xceed.Editors.Design.MaskUIEditor,Xceed.Grid.v4.3.Design,Version=4.3.20076.12375,Culture=neutral,PublicKeyToken=ba83ff368b7563c6", System.Drawing.Design.UITypeEditor)]
public string Mask {get; set;}

Property Value

A string representing the masked applied to the editor's text.
Remarks

The casing characters (< and >) only affect the characters entered by keyboard when they are the first characters of the mask. Casing characters located anywhere else are considered to be literals.

By default, the following mask characters are supported:

# Digits or white space
9 Digits only
A Alpha-numeric values only
a Alpha-numeric values or white space
@ Letters only
& Any printable character (ascii characters from 32 to 126 and 128 to 255)

The following table provides a list of characters which are not mask characters but still affect the formatting of the text:

> When used as the first character of a mask, it converts all inputted characters to uppercase. When used elsewhere within the mask, it is considered as a literal.
< When used as the first character of a mask, it converts all inputted characters to lowercase. When used elsewhere within the mask, it is considered as a literal.
\ The character following this character will always be considered as a literal. For example, \9 will be the 9 literal instead of the digits mask character.
All other characters are considered as literals.

Requirements

Target Platforms: Windows 7, 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

Reference

TextEditor Class
TextEditor Members
MaskPromptChar Property