In This Article

MaskedStringPropertyEditor Class

Represents a PropertyEditor for editing a masked String value with a MaskedTextBox.

public class MaskedStringPropertyEditor : PropertyEditorBase, INotifyPropertyChanged
Inheritance:
System.Object ObservableObjectBase PropertyEditor PropertyEditorBase Object

Remarks

This property editor is not automatically installed by the BuiltinPropertyEditors since it requires a specific Mask to be set to the scenario in which it is used. Set a Mask and also the PropertyName (or also ObjectType and PropertyType properties as needed) of the property to target with this property editor.

Constructors

MaskedStringPropertyEditor()

Initializes an instance of the MaskedStringPropertyEditor class.

public MaskedStringPropertyEditor()

Properties

BorderThickness

Gets or sets the border thickness.

public Thickness BorderThickness { get; set; }

Property Value

System.Windows.Thickness:

The border thickness. The default value is 0.

IsCaseAutoCorrected

Gets or sets whether characters entered will have their case auto-corrected to match the defined mask.

public bool IsCaseAutoCorrected { get; set; }

Property Value

System.Boolean:

true if characters entered will have their case auto-corrected to match the defined mask; otherwise, false. The default value is false.

Remarks

When this property is set to true, then the IsCaseSensitive property is ignored.

IsCaseSensitive

Gets or sets whether the mask is case sensitive.

public bool IsCaseSensitive { get; set; }

Property Value

System.Boolean:

true if the mask is case sensitive; otherwise, false. The default value is false.

Remarks

When the IsCaseAutoCorrected property is set to true, this property is ignored.

Mask

Gets or sets the text that designates the input mask.

public string Mask { get; set; }

Property Value

System.String:

The text that designates the input mask. The default value is null.

MaskKind

Gets or sets the kind of input mask.

public MaskKind MaskKind { get; set; }

Property Value

MaskKind:

The kind of input mask. The default value is Regex.

PredefinedValueTemplateKey

Gets the resource key that references a pre-defined System.Windows.DataTemplate within internal resources to use for editing the property value.

protected override object PredefinedValueTemplateKey { get; }

Property Value

System.Object:

The resource key that references a pre-defined System.Windows.DataTemplate within internal resources to use for editing the property value.

PromptChar

Gets or sets the character used to indicate required input.

public char PromptChar { get; set; }

Property Value

System.Char:

The character used to indicate required input. The default value is \u2022.

PromptVisibility

Gets or sets the visibility of mask prompts.

public MaskPromptVisibility PromptVisibility { get; set; }

Property Value

MaskPromptVisibility:

A MaskPromptVisibility that indicates the visibility of mask prompts. The default value is FocusedOnly.

Inherited Members