Basic Features

Masking the input

To mask the input, set the MaskType and Mask property as follows:

<syncfusion:SfMaskedEdit MaskType="Simple" Mask="00/00/0000"  HorizontalAlignment="Left"  TextWrapping="Wrap"  VerticalAlignment="Top" Width="255" Height="46"/>
SfMaskedEdit maskededit = new SfMaskedEdit();
maskededit.MaskType=MaskType.Simple;
maskedEdit.Mask=00/00/0000;

This mask expression allows only numeric inputs in the places of 0.

Setting value

Set the Value property as follows:

<syncfusion:SfMaskedEdit MaskType="Simple" Mask="00/00/0000" Value="14/11/2014" HorizontalAlignment="Left"  TextWrapping="Wrap"  VerticalAlignment="Top" Width="255" Height="46"/>
SfMaskedEdit maskededit = new SfMaskedEdit();
maskededit.MaskType=MaskType.Simple;
maskedEdit.Mask=00/00/0000;
maskedEdit.Value=14/11/2014;

Setting prompt char

Set the PromptChar property as follows

<syncfusion:SfMaskedEdit  MaskType="Simple" Mask="00/00/0000" PromptChar="*"  HorizontalAlignment="Left"  TextWrapping="Wrap"  VerticalAlignment="Top" Width="255" Height="46"/>
SfMaskedEdit maskededit = new SfMaskedEdit();
maskededit.MaskType=MaskType.Simple;
maskedEdit.Mask=00/00/0000;
maskedEdit.PromptChar=*;

By default, the prompt character is ‘_’.

Setting watermark

Set the watermark property as follows

<syncfusion:SfMaskedEdit  MaskType="Simple" Mask="00/00/0000" Watermark="Mask"  HorizontalAlignment="Left"  TextWrapping="Wrap"  VerticalAlignment="Top" Width="255" Height="46"/>
SfMaskedEdit maskededit = new SfMaskedEdit();
maskededit.MaskType=MaskType.Simple;
maskedEdit.Mask=00/00/0000;
maskedEdit.Watermark=Type here;