menu

MAUI

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

    Show / Hide Table of Contents

    Class DataFormListItem

    Represents the class that encapsulates the common picker editor settings.

    Inheritance
    System.Object
    DataFormViewItem
    DataFormItem
    DataFormListItem
    DataFormAutoCompleteItem
    DataFormComboBoxItem
    DataFormPickerItem
    DataFormRadioGroupItem
    DataFormSegmentItem
    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 DataFormListItem : DataFormItem, IThemeElement

    Constructors

    DataFormListItem()

    Declaration
    protected DataFormListItem()

    Fields

    DisplayMemberPathProperty

    Identifies the DisplayMemberPath dependency property.

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

    The identifier for DisplayMemberPath dependency property.

    ItemsSourceProperty

    Identifies the ItemsSource dependency property.

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

    The identifier for ItemsSource dependency property.

    SelectedValuePathProperty

    Identifies the SelectedValuePath dependency property.

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

    The identifier for SelectedValuePath dependency property.

    Properties

    DisplayMemberPath

    Gets or sets a path to a value on the source object that will get displayed in picker.

    Declaration
    public string DisplayMemberPath { get; set; }
    Property Value
    Type
    System.String
    See Also
    ItemsSource

    ItemsSource

    Gets or sets the collection which will get displayed in picker where the user can select from available items.

    Declaration
    public object ItemsSource { get; set; }
    Property Value
    Type
    System.Object
    Examples

    The below examples shows, how to use the ItemsSource property of DataFormListItem in the SfDataForm.

    • XAML
    • C#
    • C#
    • C#
    <dataForm:SfDataForm x:Name="dataForm"
                          AutoGenerateItems="True"
                          DataObject="{Binding SocialMedia}">
       <dataForm:SfDataForm.BindingContext>
           <local:SocialMediaViewModel/>
       </dataForm:SfDataForm.BindingContext>
    </dataForm:SfDataForm>
    public class SocialMedia
    {
       public string Name { get; set; }
       public int ID { get; set; }
    }
    public class SocialMediaViewModel
    {
       public SocialMedia SocialMedia { get;set; }
    }
    this.dataForm.DataObject = new SocialMediaViewModel().SocialMedia;
    this.dataForm.RegisterEditor(nameof(SocialMedia.Name), DataFormEditorType.ComboBox);
    this.dataForm.GenerateDataFormItem += this.OnDataFormGenerateDataFormItem;
    private void OnDataFormGenerateDataFormItem(object sender, GenerateDataFormItemEventArgs e)
    {
      if (e.DataFormItem != null && e.DataFormItem is DataFormComboBoxItem ComboBoxItem)
      {
          List<string> events = new List<string>
          {
              "Hackathon",
              "Datathon",
              "Coding competition",
              "Business case competition"
           };
           ComboBoxItem.ItemsSource = events;
      }
    }

    SelectedValuePath

    Gets or sets a path to a value on the source object which will get saved to data field.

    Declaration
    public string SelectedValuePath { get; set; }
    Property Value
    Type
    System.String
    See Also
    ItemsSource
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved