Skip to main content

MaskMode Enum

Lists mask modes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.1.dll

NuGet Package: DevExpress.Blazor


public enum MaskMode


Name Description

The component activates a mask type based on the Value data type.


The component activates the Numeric mask type.


The component activates the Date-time mask type.


The component activates the Regular Expression mask type.


The component activates the Text mask type.


The component activates the Date-time Offset mask type.


The component activates the Time Span mask type.


The Masked Input component activates a mask type based on the data type of the component’s Value property. For instance, if you bind the component value to a DateTime object, the component activates the date-time mask type.

The component cannot automatically activate the regular expression mask type because no data type corresponds to this mask type. Set the MaskMode property to RegEx to manually activate the regular expression mask type:

<DxMaskedInput @bind-Value="Value" 
               MaskMode="@MaskMode.RegEx" />
@code {
    String Value { get; set; }

The Masked Input can convert strings that store data source objects to compatible data types. For instance, the component can convert the “11/09/2022” string to DateTime and DateTimeOffset objects. Use the MaskMode property to manually activate a mask type and convert the string to the corresponding data type.

The example below demonstrates how to activate a date-time mask type when you bind the component’s value to a String object:

<DxMaskedInput @bind-Value="Value"
               MaskMode="@MaskMode.DateTime" />
@code {
    String Value { get; set; } = "11/09/2022";

Refer to the following section for more information: Apply a Mask.

See Also