New to Telerik UI for WinUI? Download free 30-day trial


The PromptChar is a character used to represent the absence of user input in the RadMaskedInput controls. The default value is an underscore. The PromptChar character will be displayed in the RadMaskedInput controls for any mask position that the user has not filled in yet.

Example 1: Using the default PromptChar

<telerik:RadMaskedTextInput x:Name="maskedInput" Mask="####" /> 

Figure 1 : Default prompt character

WinUI RadMaskedInput Default prompt character

When the Value of a RadMaskedInput control contains an underscore character, it will be removed when you use the default prompt character. This is because of the default prompt character of the control is underscore character "_". You can alter this behavior by changing the default PromptChar or setting the ValueMode property to IncludePromptAndLiterals or IncludePromptChar.

Example 2 demonstrates how to change the default PromptChar of the control.

Example 2: Change the default prompt char

this.maskedInput.PromptChar = '$'; 

Figure 2: Custom prompt character

WinUI RadMaskedInput Custom prompt character

See Also

In this article
Not finding the help you need?