Export (0) Print
Expand All

MaskDescriptor Class

Defines a set of members for derived classes to provide options for the masked text box UI type editor.

System.Object
  System.Windows.Forms.Design.MaskDescriptor

Namespace:  System.Windows.Forms.Design
Assembly:  System.Design (in System.Design.dll)

public abstract class MaskDescriptor

The MaskDescriptor type exposes the following members.

  NameDescription
Protected methodMaskDescriptorInitializes a new instance of the MaskDescriptor class.
Top

  NameDescription
Public propertyCultureGets the CultureInfo representing the locale the mask is authored for.
Public propertyMaskGets the mask being defined.
Public propertyNameGets the user-friendly name of the mask.
Public propertySampleGets a sample of a formatted string for the mask.
Public propertyValidatingTypeGets the type providing validation associated with the mask.
Top

  NameDescription
Public methodEqualsDetermines whether the specified MaskDescriptor is equal to the current MaskDescriptor. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberIsValidMaskDescriptor(MaskDescriptor)Returns a value indicating whether the specified mask descriptor is valid and can be added to the masks list.
Public methodStatic memberIsValidMaskDescriptor(MaskDescriptor, String)Returns a value indicating whether the specified mask descriptor is valid, and provides an error description if it is not valid.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Overrides Object.ToString().)
Top

The MaskDescriptor abstract class defines the common set of properties that all mask descriptors must implement. You can use mask descriptors to create predefined mask options for use in the UI type editor for the MaskedTextBox. For example, Visual Studio provides predefined masks for data such as the Postal Code, time, different date formats, and telephone number. All predefined masks will be associated with the MaskedTextProvider parsing engine.

You can discover MaskDescriptor types at design time by querying the ITypeDiscoveryService service provider.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft