Skip to main content
A newer version of this page is available. .

TextEditSettings.MaskType Property

Gets or sets the mask type. This is a dependency property.

Namespace: DevExpress.Xpf.Editors.Settings

Assembly: DevExpress.Xpf.Core.v19.2.dll

Declaration

public MaskType MaskType { get; set; }

Property Value

Type Description
MaskType

One of the MaskType enumeration values.

Available values:

Name Description
None

Specifies that the mask feature is disabled.

DateTime

Specifies that the editor should accept date/time values, and that the mask string must use the DateTime format syntax.

DateTimeAdvancingCaret

The DateTime mask mode with the caret automatic movement feature.

After an end user enters and completes a specific portion of a date/time value, the caret automatically moves to the following part of the date/time value that can be edited.

Numeric

Specifies that the editor should accept numeric values, and that the mask string must use the Numeric format syntax.

RegEx

Specifies that the mask should be created using the full-functional regular expressions.

Regular

Specifies that the mask should be created using the simplified regular expression syntax.

Simple

Specifies that the mask should use the simplified syntax.

TimeSpan

Specifies that the editor should accept time interval values, and that the mask string must use the TimeSpan format syntax.

TimeSpanAdvancingCaret

The TimeSpan mask mode with the caret automatic movement feature.

After an end user enters and completes a specific portion of a time span value, the caret automatically moves to the following part of the time span value that can be edited.

Property Paths

You can access this nested property as listed below:

Object Type Path to MaskType
TokenEditorBehavior
.TokenEditSettings.MaskType

Remarks

To learn more, see Masked Input.

Example

<dxg:GridControl ItemsSource="{Binding Customers}">
    <dxg:GridControl.View>
        <dxg:TableView />
    </dxg:GridControl.View>
    <dxg:GridColumn FieldName="Name"/>
    <dxg:GridColumn FieldName="City"/>
    <dxg:GridColumn FieldName="Birthday">
        <dxg:GridColumn.EditSettings>
            <dxe:TextEditSettings Mask="d" MaskType="DateTime" MaskUseAsDisplayFormat="True"/>
        </dxg:GridColumn.EditSettings>
    </dxg:GridColumn>
</dxg:GridControl>

The following code snippets (auto-collected from DevExpress Examples) contain references to the MaskType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also