menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DataFormTextEditorItem - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DataFormTextEditorItem

    Represents the base class that encapsulates the layout and text editor setting for a data field.

    Inheritance
    System.Object
    DataFormViewItem
    DataFormItem
    DataFormTextEditorItem
    DataFormMaskedTextItem
    DataFormMultilineItem
    DataFormNumericItem
    DataFormPasswordItem
    DataFormTextItem
    Inherited Members
    DataFormItem.Background
    DataFormItem.BackgroundProperty
    DataFormItem.DefaultLayoutSettings
    DataFormItem.DefaultLayoutSettingsProperty
    DataFormItem.EditorHeight
    DataFormItem.EditorHeightProperty
    DataFormItem.EditorTextStyle
    DataFormItem.EditorTextStyleProperty
    DataFormItem.ErrorLabelTextStyle
    DataFormItem.ErrorLabelTextStyleProperty
    DataFormItem.FieldName
    DataFormItem.FieldNameProperty
    DataFormItem.GetValue()
    DataFormItem.GroupName
    DataFormItem.GroupNameProperty
    DataFormItem.IsReadOnly
    DataFormItem.IsReadOnlyProperty
    DataFormItem.IsValid
    DataFormItem.ItemsOrderInRow
    DataFormItem.ItemsOrderInRowProperty
    DataFormItem.LabelText
    DataFormItem.LabelTextProperty
    DataFormItem.LabelTextStyle
    DataFormItem.LabelTextStyleProperty
    DataFormItem.LayoutType
    DataFormItem.LayoutTypeProperty
    DataFormItem.LeadingView
    DataFormItem.LeadingViewPosition
    DataFormItem.LeadingViewPositionProperty
    DataFormItem.LeadingViewProperty
    DataFormItem.OnBindingContextChanged()
    DataFormItem.PlaceholderColor
    DataFormItem.PlaceholderColorProperty
    DataFormItem.PlaceholderText
    DataFormItem.PlaceholderTextProperty
    DataFormItem.PropertyInfo
    DataFormItem.SetValue(Object)
    DataFormItem.ShowErrorLabel
    DataFormItem.ShowErrorLabelProperty
    DataFormItem.ShowLabel
    DataFormItem.ShowLabelProperty
    DataFormItem.ShowLeadingView
    DataFormItem.ShowLeadingViewProperty
    DataFormItem.ShowTrailingView
    DataFormItem.ShowTrailingViewProperty
    DataFormItem.ShowValidMessageLabel
    DataFormItem.ShowValidMessageLabelProperty
    DataFormItem.TextInputLayoutSettings
    DataFormItem.TextInputLayoutSettingsProperty
    DataFormItem.TrailingView
    DataFormItem.TrailingViewPosition
    DataFormItem.TrailingViewPositionProperty
    DataFormItem.TrailingViewProperty
    DataFormItem.ValidMessageLabelTextStyle
    DataFormItem.ValidMessageLabelTextStyleProperty
    DataFormViewItem.ColumnSpan
    DataFormViewItem.ColumnSpanProperty
    DataFormViewItem.IsVisible
    DataFormViewItem.IsVisibleProperty
    DataFormViewItem.OnPropertyChanged(String)
    DataFormViewItem.Padding
    DataFormViewItem.PaddingProperty
    DataFormViewItem.RowOrder
    DataFormViewItem.RowOrderProperty
    DataFormViewItem.RowSpan
    DataFormViewItem.RowSpanProperty
    Namespace: Syncfusion.Maui.DataForm
    Assembly: Syncfusion.Maui.DataForm.dll
    Syntax
    public abstract class DataFormTextEditorItem : DataFormItem, IThemeElement

    Constructors

    DataFormTextEditorItem()

    Declaration
    protected DataFormTextEditorItem()

    Fields

    KeyboardProperty

    Identifies the Keyboard dependency property.

    Declaration
    public static readonly BindableProperty KeyboardProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for Keyboard dependency property.

    MaxLengthProperty

    Identifies the MaxLength dependency property.

    Declaration
    public static readonly BindableProperty MaxLengthProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for MaxLength dependency property.

    Properties

    Keyboard

    Gets or sets the type of keyboard used to display in the text, multiline and password editor.

    Declaration
    public Keyboard Keyboard { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Keyboard

    The default value is Microsoft.Maui.Keyboard.Default.

    Examples

    The below examples shows, how to set the Keyboard property of DataFormTextItem in the SfDataForm.

    • XAML
    • C#
    • C#
    • C#
    • C#
    <dataForm:SfDataForm x:Name="dataForm">
    </dataForm:SfDataForm>
    public class DataFormViewModel
    {
       public AccountInfo AccountInfo { get;set; }
    }
    public class AccountInfo
    {
       public string UserName { get; set; }
       [DataType(DataType.Password)]
       public string Password { get; set; }
    }
    this.dataForm.AutoGenerateItems = true;
    this.dataForm.DataObject = new DataFormViewModel().AccountInfo;
    this.dataForm.GenerateDataFormItem += OnDataFormGenerateDataFormItem;
    private void OnDataFormGenerateDataFormItem(object sender, GenerateDataFormItemEventArgs e)
    {
       if (e.DataFormItem != null && e.DataFormItem is DataFormTextItem textItem)
       {
          textItem.Keyboard = Keyboard.Text;
       }
    }
    this.dataForm.AutoGenerateItems = false;
    var items = new ObservableCollection<DataFormViewItem>();
    items.Add(new DataFormTextItem() { FieldName = "UserName", Keyboard=Keyboard.Text });
    items.Add(new DataFormPasswordItem() { FieldName = "Password", Keyboard=Keyboard.Text });
    this.dataForm.Items = items;

    MaxLength

    Gets or sets the maximum allowed length of input.

    Declaration
    public int MaxLength { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer in the interval [0,int.MaxValue]. The default value is Int.MaxValue.

    Remarks

    The MaxLength property is applicable only for DataFormTextItem, DataFormMultilineItem and DataFormPasswordItem.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved