# Prompts

## Content



You can choose to include prompt characters in the C1MaskedTextBox control. The prompt character defined that text that will appear in the control to prompt the user to enter text. The prompt character indicates to the user that text can be entered, and can be used to detail the type of text allowed. By default the underline "\_" character is used.

Note that the [TextMaskFormat](/componentone/api/wpf/online-input-net/dotnet-api/C1.WPF.Input/C1.WPF.Input.C1MaskedTextBox.TextMaskFormat.html) property must be set to **IncludePrompt** or I**ncludePromptAndLiterals** for prompt characters to be used. If you do not want prompt characters to be used, set **TextMaskFormat** to **IncludeLiterals** or **ExcludePromptAndLiterals**.

You can customize the default Prompt Character at design time, in XAML, and in code.

### In XAML

To set the [PromptChar](/componentone/api/wpf/online-input-net/dotnet-api/C1.WPF.Input/C1.WPF.Input.C1MaskedTextBox.PromptChar.html) property add **Mask="0000" PromptChar="#"** to the **<c1:C1MaskedTextBox>** tag so that it appears similar to the following:

```xml
<c1:C1MaskedTextBox Name="C1MaskedTextBox1" Mask="0000" PromptChar="#" Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="120" ></c1:C1MaskedTextBox>
```

### In Code

To set the **PromptChar** property add the following code to your project:

```vbnet
Dim x As Char = "#"c
C1MaskedTextBox1.Mask = "0000"
C1MaskedTextBox1.PromptChar = x
```

```csharp
char x = '#';
this.c1MaskedTextBox1.Mask = "0000";
this.c1MaskedTextBox1.PromptChar = x;
```

### At Design Time

To set the [PromptChar](/componentone/api/wpf/online-input-net/dotnet-api/C1.WPF.Input/C1.WPF.Input.C1MaskedTextBox.PromptChar.html) property at run time, complete the following steps:

1.  Click the **C1MaskedTextBox** control once to select it.
2.  Navigate to the **Properties** window and enter **"0000"** in the text box next to the **Mask** property to set a mask.
3.  In the **Properties** window, enter **"#"** (the pound character) in the text box next to the **PromptChar** property

**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:

![](https://cdn.mescius.io/document-site-files/images/47c7dd3c-b586-44f5-903c-f615f88e343f/images/maskedtextbox/promptchar.png)