MaskedTextBox Constructor (MaskedTextProvider^)
Initializes a new instance of the MaskedTextBox class using the specified custom mask language provider.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- maskedTextProvider
-
Type:
System.ComponentModel::MaskedTextProvider^
A custom mask language provider, derived from the MaskedTextProvider class.
| Exception | Condition |
|---|---|
| ArgumentNullException | maskedTextProvider is null. |
The maskedTextProvider parameter defines the masking language used by MaskedTextBox. It is responsible for parsing the mask and determining whether user input conforms to the current mask position. You can derive a new class from System.ComponentModel::MaskedTextProvider to define your own custom masking language, and use the MaskedTextBox(MaskedTextProvider^) constructor to replace the standard System.ComponentModel::MaskedTextProvider.
If you want to use the default masking language and supply your own input mask, you do not need to use this constructor. Instead, you can either use the MaskedTextBox(String^) constructor, or use the default constructor then set the Mask property.
Available since 2.0