Represents a control that lets users display and edit values based on a mask.
The following example shows how to create a MaskedTextBox with the Mask property set to a telephone number format.
<xctk:MaskedTextBox Mask="(000) 000-0000" />
The following example shows how to set the value of a MaskedTextBox. The Value property supports binding to any data type, but it is a String by default.
<xctk:MaskedTextBox Mask="(000) 000-0000" Value="5551234567" />
Literals can be included in the mask by setting the MaskedTextBox.IncludeLiterals to true.
<xctk:MaskedTextBox Mask="(000) 000-0000" Value="(555) 123-4567" IncludeLiterals="True" />
Prompt character can be included by using "_" in Value.
<xctk:MaskedTextBox IncludePrompt= "True" Mask="(000) 000-0000" Value="(555) 12_-____" IncludeLiterals="True" />
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2