Back to Devexpress

TextEdit.Mask Property

maui-devexpress-dot-maui-dot-editors-dot-textedit.md

latest1.9 KB
Original Source

TextEdit.Mask Property

Gets or sets a mask expression. This is a bindable property.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
public string Mask { get; set; }

Property Value

TypeDescription
String

A mask expression string.

|

Remarks

TextEdit supports input masks. A mask defines a pattern for the entered string. It can be useful when a text editor should accept a fixed-length string in a pre-defined format (for example, a phone number, zip code, etc).

Use the Mask property to specify the mask expression. It can include meta and literal characters.

  • A metacharacter is a user input placeholder (identified by the underscore character - _). Use the MaskPlaceholderChar and PlaceholderColor properties to change the character and its color. The following table lists the available metacharacters:

  • A literal character is a fixed part of the mask that cannot be edited by users. To display a metacharacter as a literal, precede it with a backslash (\).

  • XAML

xaml
<dxe:TextEdit Mask="+1 (000) 000-0000" 
              MaskPlaceholderChar="#">
</dxe:TextEdit>

See Also

TextEdit Class

TextEdit Members

DevExpress.Maui.Editors Namespace