Class SfMaskedEdit
SfMaskedEdit control restricts the data input by masks.
Inherited Members
Namespace: Syncfusion.UI.Xaml.Controls.Input
Assembly: Syncfusion.SfInput.UWP.dll
Syntax
public class SfMaskedEdit : SfTextBoxExt, IDataValidator, IDisposable
Constructors
SfMaskedEdit()
Initializes a new instance of the SfMaskedEdit class.
Declaration
public SfMaskedEdit()
Fields
CultureProperty
Identifies the Culture dependency property.
Declaration
public static readonly DependencyProperty CultureProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HasErrorProperty
Identifies the HasError dependency property.
Declaration
public static readonly DependencyProperty HasErrorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
KeyboardTypeProperty
Identifies the KeyboardType dependency property.
Declaration
public static readonly DependencyProperty KeyboardTypeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MaskProperty
Identifies the Mask dependency property.
Declaration
public static readonly DependencyProperty MaskProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MaskTypeProperty
Identifies the MaskType dependency property.
Declaration
public static readonly DependencyProperty MaskTypeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
PromptCharProperty
Identifies the PromptChar dependency property.
Declaration
public static readonly DependencyProperty PromptCharProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowPromptOnFocusProperty
Identifies the ShowPromptOnFocus dependency property.
Declaration
public static readonly DependencyProperty ShowPromptOnFocusProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ValidationModeProperty
Identifies the ValidationMode dependency property.
Declaration
public static readonly DependencyProperty ValidationModeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ValueMaskFormatProperty
Identifies the ValueMaskFormat dependency property.
Declaration
public static readonly DependencyProperty ValueMaskFormatProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ValueProperty
Identifies the Value dependency property.
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type |
---|
Windows.UI.Xaml.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 |
---|
Windows.UI.Xaml.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
add_ValueChanged(SfMaskedEdit.ValueChangedEventHandler)
Declaration
public void add_ValueChanged(SfMaskedEdit.ValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfMaskedEdit.ValueChangedEventHandler | value |
Dispose()
Disposes the instance of SfMaskedEdit
Declaration
public void Dispose()
OnApplyTemplate()
Initializes all the child elements.
Declaration
protected override void OnApplyTemplate()
Overrides
OnGotFocus(RoutedEventArgs)
Handles the got focus event.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.RoutedEventArgs | e |
Overrides
OnKeyDown(KeyRoutedEventArgs)
Handles the key down event.
Declaration
protected override void OnKeyDown(KeyRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.KeyRoutedEventArgs | e |
Overrides
OnLostFocus(RoutedEventArgs)
Handles the lost focus event.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.RoutedEventArgs | e |
Overrides
OnPointerExited(PointerRoutedEventArgs)
Declaration
protected override void OnPointerExited(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e |
OnPointerReleased(PointerRoutedEventArgs)
Declaration
protected override void OnPointerReleased(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e |
Overrides
remove_ValueChanged(SfMaskedEdit.ValueChangedEventHandler)
Declaration
public void remove_ValueChanged(SfMaskedEdit.ValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfMaskedEdit.ValueChangedEventHandler | value |
Events
ValueChanged
Invoke the event when the Value property is changed.
Declaration
public event SfMaskedEdit.ValueChangedEventHandler ValueChanged
Event Type
Type |
---|
SfMaskedEdit.ValueChangedEventHandler |