Class DropDownListBase
Represent a base class which is used to create a list control like SfComboBox or SfAutocomplete. These controls are used to selected item(s) from the suggestions displayed in drop down.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Inputs.DropDownControls
Assembly: Syncfusion.Maui.Inputs.dll
Syntax
public abstract class DropDownListBase : SfDropdownEntry, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, IVisualTreeElement, ISemanticsProvider, ITouchListener, ITextElement, IKeyboardListener
Constructors
DropDownListBase()
Initializes a new instance of the DropDownListBase class.
Declaration
public DropDownListBase()
Fields
DisplayMemberPathProperty
Identifies DisplayMemberPath bindable property.
Declaration
public static readonly BindableProperty DisplayMemberPathProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DisplayMemberPath bindable property. |
DropDownBackgroundProperty
Identifies DropDownBackground bindable property.
Declaration
public static readonly BindableProperty DropDownBackgroundProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownBackground bindable property. |
DropDownItemFontAttributesProperty
Identifies DropDownItemFontAttributes bindable property.
Declaration
public static readonly BindableProperty DropDownItemFontAttributesProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownItemFontAttributes bindable property. |
DropDownItemFontFamilyProperty
Identifies DropDownItemFontFamily bindable property.
Declaration
public static readonly BindableProperty DropDownItemFontFamilyProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownItemFontFamily bindable property. |
DropDownItemFontSizeProperty
Identifies DropDownItemFontSize bindable property.
Declaration
public static readonly BindableProperty DropDownItemFontSizeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownItemFontSize bindable property. |
DropDownItemHeightProperty
Identifies DropDownItemHeight bindable property.
Declaration
public static readonly BindableProperty DropDownItemHeightProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownItemHeight bindable property. |
DropDownItemTextColorProperty
Identifies DropDownItemTextColor bindable property.
Declaration
public static readonly BindableProperty DropDownItemTextColorProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownItemTextColor bindable property. |
DropDownStrokeProperty
Identifies DropDownStroke bindable property.
Declaration
public static readonly BindableProperty DropDownStrokeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownStroke bindable property. |
DropDownStrokeThicknessProperty
Identifies DropDownStrokeThickness bindable property.
Declaration
public static readonly BindableProperty DropDownStrokeThicknessProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownStrokeThickness bindable property. |
ItemsSourceProperty
Identifies ItemsSource bindable property.
Declaration
public static readonly BindableProperty ItemsSourceProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the ItemsSource bindable property. |
ItemTemplateProperty
Identifies ItemTemplate bindable property.
Declaration
public static readonly BindableProperty ItemTemplateProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the ItemTemplate bindable property. |
SelectedDropDownItemBackgroundProperty
Identifies SelectedDropDownItemBackground bindable property.
Declaration
public static readonly BindableProperty SelectedDropDownItemBackgroundProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the SelectedDropDownItemBackground bindable property. |
SelectedItemProperty
Identifies SelectedItem bindable property.
Declaration
public static readonly BindableProperty SelectedItemProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the SelectedItem bindable property. |
SelectedItemsProperty
Identifies SelectedItems bindable property.
Declaration
public static readonly BindableProperty SelectedItemsProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the SelectedItems bindable property. |
SelectedValuePathProperty
Identifies SelectedValuePath bindable property.
Declaration
public static readonly BindableProperty SelectedValuePathProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the SelectedValuePath bindable property. |
SelectedValueProperty
Identifies SelectedValue bindable property.
Declaration
public static readonly BindableProperty SelectedValueProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the SelectedValue bindable property. |
SelectionTextHighlightColorProperty
Identifies SelectionTextHighlightColor bindable property.
Declaration
public static readonly BindableProperty SelectionTextHighlightColorProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the SelectionTextHighlightColor bindable property. |
TextMemberPathProperty
Identifies TextMemberPath bindable property.
Declaration
public static readonly BindableProperty TextMemberPathProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the TextMemberPath bindable property. |
TextProperty
Identifies Text bindable property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the Text bindable property. |
TokenItemStyleProperty
Identifies TokenItemStyle dependency property.
Declaration
public static readonly BindableProperty TokenItemStyleProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the TokenItemStyle dependency property. |
Properties
DisplayMemberPath
Gets or sets the name or path of the property that is displayed for each data item in the drop down.
Declaration
public string DisplayMemberPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is |
Remarks
In non-editable mode, search will be performed using DisplayMemberPath
when the popup is opened.
If TextMemberPath
is null
or string.Empty
, then searching and displaying the selected value in selection box area will be based on DisplayMemberPath
.
If both TextMemberPath
and DisplayMemberPath
properties are null
or string.Empty
, then searching and displaying the selected value will be based on value received from object.ToString
.
DropDownBackground
Gets or sets the background color that is used to display in the drop down.
Declaration
public Brush DropDownBackground { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | The default value is |
DropDownItemFontAttributes
Gets or sets the font attributes that is used to display in the drop down text.
Declaration
public FontAttributes DropDownItemFontAttributes { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.FontAttributes | The default value is |
DropDownItemFontFamily
Gets or sets the font family that is used to display in the drop down text.
Declaration
public string DropDownItemFontFamily { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is |
DropDownItemFontSize
Gets or sets the font size that is used to display in the drop down text.
Declaration
public double DropDownItemFontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is |
DropDownItemHeight
Gets or sets the item height that is used to display in the drop down item.
Declaration
public double DropDownItemHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is if Windows or Maccatalyst |
DropDownItemTextColor
Gets or sets the text color that is used to display in the drop down text.
Declaration
public Color DropDownItemTextColor { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Graphics.Color | The default value is |
DropDownStroke
Gets or sets the stroke color that is used to display in the drop down view.
Declaration
public Brush DropDownStroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | The default value is |
DropDownStrokeThickness
Gets or sets the stroke thickness that is used to display in the drop down view.
Declaration
public Thickness DropDownStrokeThickness { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Thickness | The default value is if Windows or Maccatalyst |
ItemsSource
Gets or sets an object source used to generate the content of the control.
Declaration
public object ItemsSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is |
ItemTemplate
Gets or sets the data template for dropdown item in dropdown view.
Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.DataTemplate | The default value is |
SelectedDropDownItemBackground
Gets or sets the selection background color that is used to display in the drop down item selected background.
Declaration
public Brush SelectedDropDownItemBackground { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | The default value is |
SelectedItem
Gets or sets the selected item.
Declaration
public object SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is |
Remarks
Editor will show PlaceHolderText
when no item is selected.
SelectedItems
Gets or sets selected Items
Declaration
public IList SelectedItems { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.IList | The default value is |
SelectedValue
Gets the value of the SelectedItem
obtained using SelectedValuePath
.
Declaration
public object SelectedValue { get; }
Property Value
Type | Description |
---|---|
System.Object | The default value is |
Remarks
The value of the selected item.
SelectedValuePath
Gets or sets the property path that is used to get the SelectedValue
property of the SelectedItem
property.
Declaration
public string SelectedValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is |
Remarks
If SelectedValuePath
is null
, SelectedValue
will be received from object.ToString
.
SelectionTextHighlightColor
Gets or sets the selection color that is used to display in the input view text background.
Declaration
public Color SelectionTextHighlightColor { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Graphics.Color | The default value is if Windows |
Text
Gets the text that is used to display in the text box portion of the control.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is |
Remarks
This property does not have effect in non-editable mode.
TextMemberPath
Gets or sets the property path that is used to display the selected value in the text box portion or non-editable display area.
Declaration
public string TextMemberPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is |
Remarks
In editable mode, search will be performed using TextMemberPath
.
In non-editable mode, search will be performed using TextMemberPath
when the popup is not opened.
In non-editable mode, search will be performed using DisplayMemberPath
when the popup is opened.
If TextMemberPath
is null
or string.Empty
, then searching and displaying the selected value in selection box area will be based on DisplayMemberPath
.
If both TextMemberPath
and DisplayMemberPath
properties are null
or string.Empty
, then searching and displaying the selected value will be based on value received from object.ToString
.
TokenItemStyle
Gets or sets the Style that is used to display the token items.
Declaration
public Style TokenItemStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Style | The default value is null. |
Remarks
It applicable for multi-selection token mode only.
Methods
OnHandlerChanged()
Handler changed method.
Declaration
protected override void OnHandlerChanged()
Overrides
OnPropertyChanged(String)
PropertyChanged method.
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName |
Events
Completed
The completed event gets raised when pressing enter key or return key after the text is entered in the input field. It is applicable only for editable modes.
Declaration
public event EventHandler Completed
Event Type
Type |
---|
System.EventHandler |
DropDownClosed
Occurs when the dropdown popup is closed.
Declaration
public event EventHandler DropDownClosed
Event Type
Type |
---|
System.EventHandler |
SelectionChanged
Occurs when the current selection is changed.
Declaration
public event EventHandler<SelectionChangedEventArgs> SelectionChanged
Event Type
Type |
---|
System.EventHandler<SelectionChangedEventArgs> |