Class SfMaskedEdit
Represents the masked edit control, which is used to create a template for providing information such as telephone numbers, IP addresses, and so on.
Inheritance
Namespace: Syncfusion.XForms.MaskedEdit
Assembly: Syncfusion.SfMaskedEdit.XForms.dll
Syntax
public class SfMaskedEdit : View, IParentThemeElement, IThemeElement, IMaskedEdit
Constructors
SfMaskedEdit()
Initializes a new instance of the SfMaskedEdit class. This is a constructor field.
Declaration
public SfMaskedEdit()
Fields
BorderColorProperty
Identifies the BorderColor property. It describes the border stroke color of the SfMaskedEdit control.
Declaration
public static readonly BindableProperty BorderColorProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
ClearButtonVisibilityProperty
Identifies the ClearButtonVisibility property. It indicates whether displays a clear button, which enables the user to clear the text.
Declaration
public static readonly BindableProperty ClearButtonVisibilityProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
CultureProperty
Identifies the Culture property. The culture information is associated with the SfMaskedEdit control.
Declaration
public static readonly BindableProperty CultureProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
CursorPositionProperty
Identifies the CursorPosition property. It is a bindable property of cusor position.
Declaration
public static readonly BindableProperty CursorPositionProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
CutCopyMaskFormatProperty
Identifies the CutCopyMaskFormat property. Literals and prompt characters are copied to clipboard in SfMaskedEdit control.
Declaration
public static readonly BindableProperty CutCopyMaskFormatProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
EnablePasswordDelayProperty
Identifies the PasswordChar property. It is a value which displays the password character with some delay in the MaskedEdit control.
Declaration
public static readonly BindableProperty EnablePasswordDelayProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
ErrorBorderColorProperty
Identifies the ErrorBorderColor property. The border stroke color is shown when validation is failed in the SfMaskedEdit control.
Declaration
public static readonly BindableProperty ErrorBorderColorProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
FontAttributesProperty
Identifies the FontAttributes property. It indicates whether the font for the MaskedEdit text is bold, italic, or neither.
Declaration
public static readonly BindableProperty FontAttributesProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
FontFamilyProperty
Identifies the FontFamily property. This is font family for the text of SfMaskedEdit.
Declaration
public static readonly BindableProperty FontFamilyProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
FontSizeProperty
Identifies the FontSize property. This property can be used to change the size of the font for the SfMaskedEdit.
Declaration
public static readonly BindableProperty FontSizeProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
HasErrorProperty
Identifies the HasError property. It indicates whether the mask is succeeded or not in the SfMaskedEdit control.
Declaration
public static readonly BindableProperty HasErrorProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
HidePromptOnLeaveProperty
Identifies the HidePromptOnLeave property. The prompt characters in the input mask are hidden when the masked text box loses focus.
Declaration
public static readonly BindableProperty HidePromptOnLeaveProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
HorizontalTextAlignmentProperty
Identifies the HorizontalTextAlignment property. It is horizontal alignment for the text of the SfMaskedEdit control.
Declaration
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
IsReadOnlyProperty
Backing store for the IsReadOnly bindable property.
Declaration
public static readonly BindableProperty IsReadOnlyProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
IsSpellCheckEnabledProperty
Identifies the IsSpellCheckEnabled property.This property is used to control the spell checking of masked edit display text.
Declaration
public static readonly BindableProperty IsSpellCheckEnabledProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
IsTextPredictionEnabledProperty
Identifies the IsTextPredictionEnabled property.This property is used to control the text prediction and automatic text correction of masked edit display text.
Declaration
public static readonly BindableProperty IsTextPredictionEnabledProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
KeyboardProperty
Identifies the Keyboard property. The value of the Keyboard for the SfMaskedEdit control.
Declaration
public static readonly BindableProperty KeyboardProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
MaskProperty
Identifies the Mask property. It is used to validate input as users type in the SfMaskedEdit control.
Declaration
public static readonly BindableProperty MaskProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
MaskTypeProperty
Identifies the MaskType property. The types of mask elements are used to validate user input in the SfMaskedEdit control.
Declaration
public static readonly BindableProperty MaskTypeProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
PasswordCharProperty
Identifies the PasswordChar property. It is a value to be displayed in substitute of user input in the MaskedEdit control.
Declaration
public static readonly BindableProperty PasswordCharProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
PasswordDelayDurationProperty
Identifies the PasswordChar property. It is a value which describes the duration of the password delay in the MaskedEdit control.
Declaration
public static readonly BindableProperty PasswordDelayDurationProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
PromptCharProperty
Identifies the PromptChar property. The character is used to represent the absence of user input in the SfMaskedEdit control.
Declaration
public static readonly BindableProperty PromptCharProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
ReturnCommandParameterProperty
Identifies the PasswordChar property. It is a value which describes the duration of the password delay in the MaskedEdit control.
Declaration
public static readonly BindableProperty ReturnCommandParameterProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
ReturnCommandProperty
Identifies the PasswordChar property. It is a value which describes the duration of the password delay in the MaskedEdit control.
Declaration
public static readonly BindableProperty ReturnCommandProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
ReturnTypeProperty
Identifies the ReturnTypeProperty property. Literals and prompt characters are copied to clipboard in SfMaskedEdit control.
Declaration
public static readonly BindableProperty ReturnTypeProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
SelectAllOnFocusProperty
Identifies the SelectAllOnFocus property.This property is used to specify whether select all the text or not on focus the control.
Declaration
public static readonly BindableProperty SelectAllOnFocusProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
SkipLiteralsProperty
Identifies the SkipLiterals property. It indicates whether users are allowed to reenter literal values.
Declaration
public static readonly BindableProperty SkipLiteralsProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
TextColorProperty
Identifies the TextColor property. It is color for the text of the SfMaskedEdit control.
Declaration
public static readonly BindableProperty TextColorProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
ValidationModeProperty
Identifies the ValidationMode property. It is input validation mode of SfMaskedEdit.
Declaration
public static readonly BindableProperty ValidationModeProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
ValueMaskFormatProperty
Identifies the ValueMaskFormat property. The value formatting option of SfMaskedEdit.
Declaration
public static readonly BindableProperty ValueMaskFormatProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
ValueProperty
Identifies the Value property. It is raw value of the SfMaskedEdit control.
Declaration
public static readonly BindableProperty ValueProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
WatermarkColorProperty
Identifies the WatermarkColor property. It's the color of the watermark text when the MaskedEdit value is null or empty.
Declaration
public static readonly BindableProperty WatermarkColorProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
WatermarkFontAttributesProperty
Identifies the WatermarkFontAttributes property. It is font attributes of the watermark text when the MaskedEdit Value is null or empty.
Declaration
public static readonly BindableProperty WatermarkFontAttributesProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
WatermarkFontFamilyProperty
Identifies the WatermarkFontFamily property. The font family of the watermark text when the MaskedEdit Value is null or empty.
Declaration
public static readonly BindableProperty WatermarkFontFamilyProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
WatermarkFontSizeProperty
Identifies the WatermarkFontSize property. It's font size of the watermark text when the MaskedEdit value is null or empty.
Declaration
public static readonly BindableProperty WatermarkFontSizeProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
WatermarkProperty
Identifies the Watermark property. The watermark text is shown when the MaskedEdit value is null or empty.
Declaration
public static readonly BindableProperty WatermarkProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
Properties
BorderColor
Gets or sets a color that describes the border stroke color of the SfMaskedEdit control.
Declaration
public Color BorderColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.Color | The default value is Azure. |
ClearButtonVisibility
Gets or sets a value indicating whether displays a clear button, which enables the user to clear the text.
Declaration
public ClearButtonVisibilityMode ClearButtonVisibility { get; set; }
Property Value
| Type |
|---|
| ClearButtonVisibilityMode |
Culture
Gets or sets the culture information associated with the SfMaskedEdit control.
Declaration
public CultureInfo Culture { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Globalization.CultureInfo | The default value is CurrentUICulture. |
CursorPosition
Gets or sets the position of the cursor in masked edit.
Declaration
public int CursorPosition { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
CutCopyMaskFormat
Gets or sets a value that determines whether literals and prompt characters are copied to clipboard in the SfMaskedEdit control.
Declaration
public MaskFormat CutCopyMaskFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| MaskFormat | The default value is null. |
EnablePasswordDelay
Gets or sets a value indicating whether gets or sets a value to be displayed with delay when typing the password character SfMaskedEdit control.
Declaration
public bool EnablePasswordDelay { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is false. |
ErrorBorderColor
Gets or sets a border stroke color shown when the validation was failed in the SfMaskedEdit control.
Declaration
public Color ErrorBorderColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.Color | The default value is Red. |
FontAttributes
Gets or sets the value that indicates whether the font for the MaskedEdit text is bold,italic, or neither.
Declaration
public FontAttributes FontAttributes { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.FontAttributes | The default value is Azure. |
FontFamily
Gets or sets the font family for the text of SfMaskedEdit.
Declaration
public string FontFamily { get; set; }
Property Value
| Type |
|---|
| System.String |
FontSize
Gets or sets the value of FontSize. This property can be used to the size of the font for SfMaskedEdit.
Declaration
public double FontSize { get; set; }
Property Value
| Type |
|---|
| System.Double |
HasError
Gets a value indicating whether the mask is succeeded or not in the SfMaskedEdit control.
Declaration
public bool HasError { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is false. |
HidePromptOnLeave
Gets or sets a value indicating whether the prompt characters in the input mask are hidden when the masked text box loses focus.
Declaration
public bool HidePromptOnLeave { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is false. |
HorizontalTextAlignment
Gets or sets the horizontal alignment for the text of SfMaskedEdit control.
Declaration
public TextAlignment HorizontalTextAlignment { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.TextAlignment | The default value is Start. |
IsReadOnly
Gets or sets a value indicating whether user should be prevented from modifying the text. Default is false.
Declaration
public bool IsReadOnly { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
IsSpellCheckEnabled
Gets or sets a value indicating whether to control the spell checking of masked edit display text.
Declaration
public bool IsSpellCheckEnabled { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
IsTextPredictionEnabled
Gets or sets a value indicating whether to control the text prediction and automatic text correction of masked edit display text.
Declaration
public bool IsTextPredictionEnabled { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Keyboard
Gets or sets the value of the Keyboard for the SfMaskedEdit control.
Declaration
public Keyboard Keyboard { get; set; }
Property Value
| Type |
|---|
| Xamarin.Forms.Keyboard |
Mask
Gets or sets the mask used to validate input as the user types. The mask must be a string composed of one or more of the masking elements.
Declaration
public string Mask { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is Empty. |
MaskType
Gets or sets the type of mask elements used to validate user input in the SfMaskedEdit control.
Declaration
public MaskType MaskType { get; set; }
Property Value
| Type | Description |
|---|---|
| MaskType | The default value is Text. |
PasswordChar
Gets or sets a value to be displayed in substitute of user input in the SfMaskedEdit control.
Declaration
public char PasswordChar { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Char | The default value is ''. |
PasswordDelayDuration
Gets or sets the duration of the delay when tying the password character SfMaskedEdit control.
Declaration
public double PasswordDelayDuration { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | The default value is 1. |
PromptChar
Gets or sets the character used to represent the absence of user input in the SfMaskedEdit control.
Declaration
public char PromptChar { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Char | The default value is ''. |
ReturnCommand
Gets or sets the command to run when the user presses the return key.
Declaration
public ICommand ReturnCommand { get; set; }
Property Value
| Type |
|---|
| System.Windows.Input.ICommand |
ReturnCommandParameter
Gets or sets the parameter for the ReturnCommand.
Declaration
public object ReturnCommandParameter { get; set; }
Property Value
| Type |
|---|
| System.Object |
ReturnType
Gets or sets an enumeration value that controls the appearance of the return button.
Declaration
public ReturnType ReturnType { get; set; }
Property Value
| Type |
|---|
| Xamarin.Forms.ReturnType |
SelectAllOnFocus
Declaration
public bool SelectAllOnFocus { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
SkipLiterals
Gets or sets a value indicating whether whether user is allowed to reenter literal values in the SfMaskedEdit control.
Declaration
public bool SkipLiterals { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
TextColor
Gets or sets the color for the text of the SfMaskedEdit control.
Declaration
public Color TextColor { get; set; }
Property Value
| Type |
|---|
| Xamarin.Forms.Color |
ValidationMode
Gets or sets the input validation mode of the SfMaskedEdit control.
Declaration
public InputValidationMode ValidationMode { get; set; }
Property Value
| Type | Description |
|---|---|
| InputValidationMode | The default value is LostFocus. |
Value
Gets or sets the raw value of the SfMaskedEdit control.
Declaration
public object Value { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The default value is null. |
ValueMaskFormat
Gets or sets the value formatting option of the SfMaskedEdit control.
Declaration
public MaskFormat ValueMaskFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| MaskFormat | The default value is IncludePrompt. |
Watermark
Gets or sets the watermark text shown when the SfMaskedEdit value is null or empty.
Declaration
public string Watermark { get; set; }
Property Value
| Type |
|---|
| System.String |
WatermarkColor
Gets or sets the color of the watermark text when the SfMaskedEdit value is null or empty.
Declaration
public Color WatermarkColor { get; set; }
Property Value
| Type |
|---|
| Xamarin.Forms.Color |
WatermarkFontAttributes
Gets or sets the value that indicates whether the font for the watermark text is bold,italic, or neither.
Declaration
public FontAttributes WatermarkFontAttributes { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.FontAttributes | The default value is Azure. |
WatermarkFontFamily
Gets or sets the font family for the watermark text when the SfMaskedEdit value is null or empty.
Declaration
public string WatermarkFontFamily { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is Azure. |
WatermarkFontSize
Gets or sets the font size of the watermark text when the SfMaskedEdit value is null or empty.
Declaration
public double WatermarkFontSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | The default value is false. |
Methods
add_MaskInputRejected(MaskInputRejectedEventHandler)
Declaration
public void add_MaskInputRejected(MaskInputRejectedEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| MaskInputRejectedEventHandler | value |
add_ValueChanged(ValueChangedEventHandler)
Declaration
public void add_ValueChanged(ValueChangedEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventHandler | value |
remove_MaskInputRejected(MaskInputRejectedEventHandler)
Declaration
public void remove_MaskInputRejected(MaskInputRejectedEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| MaskInputRejectedEventHandler | value |
remove_ValueChanged(ValueChangedEventHandler)
Declaration
public void remove_ValueChanged(ValueChangedEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventHandler | value |
Events
Completed
The EventHandler is invoked when the return key is pressed in Completed.
Declaration
public event EventHandler Completed
Event Type
| Type |
|---|
| System.EventHandler |
CursorPositionChanging
Raised the event during the change of cursor position.
Declaration
public event EventHandler<CursorPositionChangingEventArgs> CursorPositionChanging
Event Type
| Type |
|---|
| System.EventHandler<CursorPositionChangingEventArgs> |
MaskInputRejected
This MaskInputRejected occurs when a character is rejected by the input mask in SfMaskedEdit.
Declaration
public event MaskInputRejectedEventHandler MaskInputRejected
Event Type
| Type |
|---|
| MaskInputRejectedEventHandler |
ValueChanged
This ValueChanged event occurs when Value is changed.
Declaration
public event ValueChangedEventHandler ValueChanged
Event Type
| Type |
|---|
| ValueChangedEventHandler |