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

Getting Started with WinForms MaskedEditBox

Here is how to quickly configure two RadMaskedEditBox controls. One uses a custom phone number mask, the second as a predefined short date pattern.

Figure 1: RadMaskedEditBox Setup

WinForms RadMaskedEditBox Setup

  1. Drop two RadMaskedEditBox controls on a form.

  2. In the first RadMaskedEditBox set the MaskType property to Standard and the Mask property to "(###) ###-###". See *Standard Masks for more information on how this mask is constructed.*

  3. In the second RadMaskedEditBox set the MaskType property to DateTime and the Mask property to "d". * See Date and Time Masks** for more information on how this mask is constructed.*

  4. Press F5 to run the application. Notice the behavior in the first RadMaskedEditBox where the literals "(" and ")" are jumped over and cannot be replaced by the user. Also notice that mask characters are represented by the character in the PromptChar property (by default this is the underscore "_" character) when blank.

See Also

Telerik UI for WinForms Learning Resources

In this article