Back to Devexpress

DxTextMaskProperties Class

blazor-devexpress-dot-blazor-b516d94c.md

latest2.4 KB
Original Source

DxTextMaskProperties Class

Defines properties for Text masks.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class DxTextMaskProperties :
    DxMaskPropertiesBase

Remarks

Use this class’s properties to set up the Masked Input component with a Text mask applied.

Specify a Custom Placeholder

Use the Placeholder property to specify an input prompt character.

razor
<DxMaskedInput @bind-Value="Value"
               Mask="(000) 000-0000" >
    <DxTextMaskProperties Placeholder="Placeholder" />
</DxMaskedInput>

@code{
    String Value { get; set; }
    char Placeholder = '#';
}

Exclude Literals from a Value

Literal characters are arbitrary read-only characters in the Masked Input’s edit box. Literal characters are saved to the component’s Value. To change this default behavior and not save literals to the editor’s value, set the SaveLiteral property to false.

razor
<DxMaskedInput @bind-Value="Value"
               Mask="(000) 000-0000">
    <DxTextMaskProperties SaveLiteral="false" />
</DxMaskedInput>

@code{
    String Value { get; set; }
}

Implements

IComponent

IHandleEvent

IHandleAfterRender

Inheritance

Object ComponentBase DxMaskPropertiesBase DxTextMaskProperties

See Also

DxTextMaskProperties Members

DevExpress.Blazor Namespace