Class DataFormMaskedTextItem
Represents the class that encapsulates the layout and masked text editor(SfMaskedEntry) settings for data field.
Inheritance
Inherited Members
Namespace: Syncfusion.Maui.DataForm
Assembly: Syncfusion.Maui.DataForm.dll
Syntax
public class DataFormMaskedTextItem : DataFormTextEditorItem, IThemeElement
Remarks
The Syncfusion.Maui.DataForm.DataFormMaskedTextEditor is applied by default for PhoneNumber
and CreditCard
data attribute type.
It can also be loaded by setting MaskedText through RegisterEditor(String, DataFormEditorType).
Examples
The below example shows how to create data form masked text editor and how to assign properties to masked text editor.
<dataForm:SfDataForm x:Name="dataForm"
DataObject="{Binding DataModel}">
<dataForm:SfDataForm.Items>
<dataForm:DataFormMaskedTextItem
x:Name="phoneNumber" FieldName="PhoneNumber" PromptChar="*"
Mask="000-000-0000" MaskType="Simple">
</dataForm:DataFormMaskedTextItem>
</dataForm:SfDataForm.Items>
</dataForm:SfDataForm>
Constructors
DataFormMaskedTextItem()
Initializes a new instance of the DataFormMaskedTextItem class.
Declaration
public DataFormMaskedTextItem()
Fields
ClearButtonVisibilityProperty
Identifies the ClearButtonVisibility dependency property.
Declaration
public static readonly BindableProperty ClearButtonVisibilityProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for ClearButtonVisibility dependency property. |
Remarks
The ClearButtonVisibility property is applicable only for Windows.
CultureProperty
Identifies the Culture dependency property.
Declaration
public static readonly BindableProperty CultureProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Culture dependency property. |
MaskProperty
Identifies the Mask dependency property.
Declaration
public static readonly BindableProperty MaskProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Mask dependency property. |
MaskTypeProperty
Identifies the MaskType dependency property.
Declaration
public static readonly BindableProperty MaskTypeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for MaskType dependency property. |
PromptCharProperty
Identifies the PromptChar dependency property.
Declaration
public static readonly BindableProperty PromptCharProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for PromptChar dependency property. |
ValueMaskFormatProperty
Identifies the ValueMaskFormat dependency property.
Declaration
public static readonly BindableProperty ValueMaskFormatProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for ValueMaskFormat dependency property. |
Properties
ClearButtonVisibility
Gets or sets a value indicating when to display a clear button, which enables the user to clear the text.
Declaration
public MaskedEditorClearButtonVisibility ClearButtonVisibility { get; set; }
Property Value
Type |
---|
MaskedEditorClearButtonVisibility |
Remarks
The ClearButtonVisibility property is applicable only for Windows.
Culture
Gets or sets the culture for mask values based on the given Culture.
Declaration
public CultureInfo Culture { get; set; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo | It takes the culture value. The default value is System.Globalization.CultureInfo.CurrentCulture. |
Mask
Gets or sets the mask value which restricts the inputs provided in the control.
Declaration
public string Mask { get; set; }
Property Value
Type | Description |
---|---|
System.String | It takes the string value. The default value is null. |
MaskType
Gets or sets the mask type for the Syncfusion.Maui.DataForm.DataFormMaskedTextEditor.
Declaration
public MaskedEditorMaskType MaskType { get; set; }
Property Value
Type | Description |
---|---|
MaskedEditorMaskType | It takes the mask type value. The default value is Simple. |
PromptChar
Gets or sets a char which used as a prompt char of Syncfusion.Maui.DataForm.DataFormMaskedTextEditor.
Declaration
public char PromptChar { get; set; }
Property Value
Type | Description |
---|---|
System.Char | It takes the char value. The default value is "_". |
ValueMaskFormat
Gets or sets the format for the value.
Declaration
public MaskedEditorMaskFormat ValueMaskFormat { get; set; }
Property Value
Type | Description |
---|---|
MaskedEditorMaskFormat | It takes the mask format for the value. The default value is IncludePromptAndLiterals. |