MaskProperties.EditMask Property
Gets or sets a mask expression.
Namespace: DevExpress.XtraEditors.Mask
Assembly: DevExpress.XtraEditors.v22.2.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | A string representing a mask expression. |
Remarks
Before you construct a mask, specify its type in the MaskProperties.MaskType property. Refer to the Input Mask document for information on the available mask types. This also provides links to documents that describe the mask syntaxes for different mask modes.
The code sample below illustrates how to create a mask for a phone number:
(a value is not entered)
(a value is entered)
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Mask;
..
textEdit1.Properties.Mask.MaskType = MaskType.Simple;
textEdit1.Properties.Mask.EditMask = "(000)000-00-00";