Back to Devexpress

DataFormMaskedItem.Mask Property

maui-devexpress-dot-maui-dot-dataform-dot-dataformmaskeditem.md

latest1.8 KB
Original Source

DataFormMaskedItem.Mask Property

Gets or sets the editor’s input mask expression.

Namespace : DevExpress.Maui.DataForm

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
public string Mask { get; set; }

Property Value

TypeDefaultDescription
String""

A mask expression string.

|

Remarks

A mask defines a pattern used for entered values. For example, 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 - _).
    The following table lists the available metacharacters:

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

The following example shows how to specify a mask and apply it to a value of the data object’s Phone property:

xaml
<dxdf:DataFormView x:Name="dataForm">
    <!--...-->
    <dxdf:DataFormMaskedItem FieldName="Phone" Mask="(000) 000-0000"/>
</dxdf:DataFormView>

See Also

DataFormMaskedItem Class

DataFormMaskedItem Members

DevExpress.Maui.DataForm Namespace