Class SfMaskedEdit
Syncfusion.UI.Xaml.Controls.Input.SfMaskedEdit control restricts the data input by masks.
Inherited Members
Namespace: Syncfusion.Windows.Controls.Input
Assembly: Syncfusion.SfInput.Wpf.dll
Syntax
public class SfMaskedEdit : SfTextBoxExt, ITextInputLayoutSelector, IDisposable
Constructors
SfMaskedEdit()
Initializes a new instance of the Syncfusion.UI.Xaml.Controls.Input.SfMaskedEdit class.
Declaration
public SfMaskedEdit()
Fields
CultureProperty
Identifies the Culture dependency property.
Declaration
public static readonly DependencyProperty CultureProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
HasErrorProperty
Identifies the HasError dependency property.
Declaration
public static readonly DependencyProperty HasErrorProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
KeyboardTypeProperty
Identifies the KeyboardType dependency property.
Declaration
public static readonly DependencyProperty KeyboardTypeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
MaskProperty
Identifies the Mask dependency property.
Declaration
public static readonly DependencyProperty MaskProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
MaskTypeProperty
Identifies the MaskType dependency property.
Declaration
public static readonly DependencyProperty MaskTypeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
PromptCharProperty
Identifies the PromptChar dependency property.
Declaration
public static readonly DependencyProperty PromptCharProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
ShowPromptOnFocusProperty
Identifies the ShowPromptOnFocus dependency property.
Declaration
public static readonly DependencyProperty ShowPromptOnFocusProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
ValidationModeProperty
Identifies the ValidationMode dependency property.
Declaration
public static readonly DependencyProperty ValidationModeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
ValueMaskFormatProperty
Identifies the ValueMaskFormat dependency property.
Declaration
public static readonly DependencyProperty ValueMaskFormatProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
ValueProperty
Identifies the Value dependency property.
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Properties
Culture
Gets or sets the System.Globalization.CultureInfo object that represents the current user interface culture.
Declaration
public CultureInfo Culture { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Globalization.CultureInfo | Default value is Culture |
ErrorBorderBrush
Gets or sets the border brush color of the SfMaskedEdit when the input is invalid.
Declaration
public Brush ErrorBorderBrush { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.Brush |
HasError
Gets a value that indicates whether the text validation has an error.
Declaration
public bool HasError { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is false. |
KeyboardType
Gets or sets the type of the Keyboard, whether QWERTY or others.
Declaration
public KeyboardOptions KeyboardType { get; set; }
Property Value
| Type | Description |
|---|---|
| KeyboardOptions | Default value is QWERTY |
Mask
Gets or sets the Mask.
Declaration
public string Mask { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null. |
MaskType
Gets or sets the MaskType of SfMaskedEdit.
Declaration
public MaskType MaskType { get; set; }
Property Value
| Type | Description |
|---|---|
| MaskType | The default value is MaskType.Simple Syncfusion.UI.Xaml.Controls.MaskType. |
PromptChar
Gets or sets a char which used as a prompt char of SfMaskedEdit.
Declaration
public char PromptChar { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Char | The default value is '_'. |
ShowPromptOnFocus
Gets or sets a value indicating whether to show prompt on control focused.
Declaration
public bool ShowPromptOnFocus { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is false. |
ValidationMode
Gets or sets a value that indicates whether to validate text on the key pressed or on the lost focus.
Declaration
public InputValidationMode ValidationMode { get; set; }
Property Value
| Type | Description |
|---|---|
| InputValidationMode | Default value is ValidationMode.KeyPress. |
Value
Gets or sets the value of the SfMaskedEdit
Declaration
public object Value { get; set; }
Property Value
| Type |
|---|
| System.Object |
ValueMaskFormat
Gets or sets the format of the Mask.
Declaration
public MaskFormat ValueMaskFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| MaskFormat | The default value is MaskFormat.IncludePromptAndLiterals. |
Methods
Dispose()
Disposes the instance of SfMaskedEdit
Declaration
public void Dispose()
OnApplyTemplate()
Initializes all the child elements.
Declaration
public override void OnApplyTemplate()
Overrides
OnGotFocus(RoutedEventArgs)
Handles the got focus event.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.RoutedEventArgs | e |
Overrides
OnLostFocus(RoutedEventArgs)
Handles the lost focus event.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.RoutedEventArgs | e |
Overrides
OnPreviewKeyDown(KeyEventArgs)
Handles the preview key down event.
Declaration
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.KeyEventArgs | e |
Overrides
Events
CopyContent
Occurs when the copy operation is performed on the SfMaskedEdit.
Declaration
public event EventHandler<ClipboardEventArgs> CopyContent
Event Type
| Type |
|---|
| System.EventHandler<ClipboardEventArgs> |
CutContent
Occurs when the cut operation is performed on the SfMaskedEdit.
Declaration
public event EventHandler<ClipboardEventArgs> CutContent
Event Type
| Type |
|---|
| System.EventHandler<ClipboardEventArgs> |
PasteContent
Occurs while paste the content on the SfMaskedEdit.
Declaration
public event EventHandler<ClipboardEventArgs> PasteContent
Event Type
| Type |
|---|
| System.EventHandler<ClipboardEventArgs> |
ValueChanged
Invoke the event when the Value property is changed.
Declaration
public event SfMaskedEdit.ValueChangedEventHandler ValueChanged
Event Type
| Type |
|---|
| SfMaskedEdit.ValueChangedEventHandler |