The C1MaskedTextBox.PromptChar property sets the characters that are used to prompt users in the C1MaskedTextBox control. By default the C1MaskedTextBox.PromptChar property is set to an underline character ("_") but you can customize this. For more details about the C1MaskedTextBox.PromptChar property, see Prompts.
At Design Time
To set the C1MaskedTextBox.PromptChar property, complete the following steps:
In XAML
To set the C1MaskedTextBox.PromptChar property add Mask="0000" PromptChar="#" to the <Xaml:C1MaskedTextBox> tag so that it appears similar to the following:
| Markup |
Copy Code
|
|---|---|
<Xaml:C1MaskedTextBox Height="23" Name="C1MaskedTextBox1" Width="120" Mask="0000" PromptChar="#"></Xaml:C1MaskedTextBox> |
|
In Code
To set the C1MaskedTextBox.PromptChar property add the following code to your project:
| Visual Basic |
Copy Code
|
|---|---|
Dim x As Char = "#"c C1MaskedTextBox1.Mask = "0000" C1MaskedTextBox1.PromptChar = x |
|
| C# |
Copy Code
|
|---|---|
char x = '#'; this.c1MaskedTextBox1.Mask = "0000"; this.c1MaskedTextBox1.PromptChar = x; |
|
Run your project and observe:
The pound character will appear as the prompt in the control. In the following image, the number 32 was entered in the control:
![]()