Class SfComboBox
The combobox is a textbox component that allows users to type a value or choose an option from the list of predefined options.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Inputs
Assembly: Syncfusion.Maui.Inputs.dll
Syntax
public class SfComboBox : DropDownListBase, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, ITouchListener, ITextElement, IKeyboardListener, IParentThemeElement, IThemeElement
Constructors
SfComboBox()
Initializes a new instance of the SfComboBox class.
Declaration
public SfComboBox()
Fields
CustomViewProperty
Identifies CustomView bindable property.
Declaration
public static readonly BindableProperty CustomViewProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the CustomView bindable property. |
DropDownButtonSettingsProperty
Identifies DropDownButtonSettings bindable property.
Declaration
public static readonly BindableProperty DropDownButtonSettingsProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownButtonSettings bindable property. |
DropDownIconColorProperty
Identifies DropDownIconColor bindable property.
Declaration
public static readonly BindableProperty DropDownIconColorProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the DropDownIconColor bindable property. |
EnableAutoSizeProperty
Identifies EnableAutoSize bindable property.
Declaration
public static readonly BindableProperty EnableAutoSizeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the EnableAutoSize bindable property. |
FilterBehaviorProperty
Invoked whenever the FilterBehavior is set.
Declaration
public static readonly BindableProperty FilterBehaviorProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
HorizontalTextAlignmentProperty
Gets or sets the value of HorizontalTextAlignment. This property can be used to give HorizontalTextAlignment to the Text in ComboBox control.This is Bindable Property.
Declaration
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
IsDropdownButtonVisibleProperty
Identifies IsDropdownButtonVisible bindable property.
Declaration
public static readonly BindableProperty IsDropdownButtonVisibleProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the IsDropdownButtonVisible bindable property. |
IsEditableProperty
Identifies IsEditable bindable property.
Declaration
public static readonly BindableProperty IsEditableProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the IsEditable bindable property. |
IsFilteringEnabledProperty
Identifies IsFilteringEnabled bindable property.
Declaration
public static readonly BindableProperty IsFilteringEnabledProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the IsFilteringEnabled bindable property. |
MultiSelectionDisplayModeProperty
Identifies MultiSelectionDisplayMode bindable property.
Declaration
public static readonly BindableProperty MultiSelectionDisplayModeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the MultiSelectionDisplayMode bindable property. |
SelectedIndexProperty
Identifies SelectedIndex bindable property.
Declaration
public static readonly BindableProperty SelectedIndexProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the SelectedIndex bindable property. |
SelectionModeProperty
Declaration
public static readonly BindableProperty SelectionModeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
ShowBorderProperty
Identifies ShowBorder bindable property.
Declaration
public static readonly BindableProperty ShowBorderProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the ShowBorder bindable property. |
TextSearchModeProperty
Identifies TextSearchMode bindable property.
Declaration
public static readonly BindableProperty TextSearchModeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the TextSearchMode bindable property. |
TokensWrapModeProperty
Identifies TokensWrapMode bindable property.
Declaration
public static readonly BindableProperty TokensWrapModeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for the TokensWrapMode bindable property. |
VerticalTextAlignmentProperty
Gets or sets the value of VerticalTextAlignment. This property can be used to give VerticalTextAlignment to the Text in ComboBox control.This is Bindable Property.
Declaration
public static readonly BindableProperty VerticalTextAlignmentProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
CustomView
Gets or sets the value of the CustomView. This property can be used to customize the view in the SfComboBox control.
Declaration
public View CustomView { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.View | The default value is |
DropDownButtonSettings
Gets or sets the value of DropDownButtonSettings. This property can be used to customize the drop-down button.
Declaration
public DropDownButtonSettings DropDownButtonSettings { get; set; }
Property Value
Type | Description |
---|---|
DropDownButtonSettings | The default value is new DropDownButtonSettings(). |
DropDownIconColor
Gets or sets the value of DropDownIconColor of the control.This property can be used to customize the dropdown icon color.
Declaration
public Color DropDownIconColor { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Graphics.Color | Specifies the dropdown icon color.The default value is Microsoft.Maui.Graphics.Colors.Black |
EnableAutoSize
Gets or sets a value that indicates the control to dynamically extend its layout based on the input content
Declaration
public bool EnableAutoSize { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if is auto sizing enable; otherwise, false. |
FilterBehavior
Gets or sets the filter behavior.
Declaration
public IComboBoxFilterBehavior FilterBehavior { get; set; }
Property Value
Type |
---|
IComboBoxFilterBehavior |
HorizontalTextAlignment
Gets or sets a value to change the horizontal alignment of text within the SfComboBox control.
Declaration
public TextAlignment HorizontalTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.TextAlignment | Specifies the text alignment.The default value is Microsoft.Maui.TextAlignment.Start. |
IsDropdownButtonVisible
Gets or sets the value for the IsDropdownButtonVisible.
Declaration
public bool IsDropdownButtonVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Specifies the dropdown button visible for SfComboBox. The default value is false. |
IsEditable
Gets or sets a value that indicates whether the user can edit text in the text box portion of the SfComboBox.
Declaration
public bool IsEditable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is |
Remarks
true if the user can edit text in the SfComboBox, otherwise false.
IsFilteringEnabled
Gets or sets a value that indicates whether the user can Enable filtering in ItemsSource
Declaration
public bool IsFilteringEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is |
Remarks
true the filetring will happen when the user enter the text in the text box SfComboBox, otherwise false.
MultiSelectionDisplayMode
Gets or sets the multi selection mode for the SfComboBox control.
Declaration
public ComboBoxMultiSelectionDisplayMode MultiSelectionDisplayMode { get; set; }
Property Value
Type |
---|
ComboBoxMultiSelectionDisplayMode |
SelectedIndex
Gets or sets the index of the selected item.
Declaration
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the selected item. The default value is |
SelectionMode
Declaration
public ComboBoxSelectionMode SelectionMode { get; set; }
Property Value
Type |
---|
ComboBoxSelectionMode |
ShowBorder
Gets or sets a value indicating whether to show or hide the border of the SfComboBox control.
Declaration
public bool ShowBorder { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true. |
TextSearchMode
Gets or sets the value of TextSearchMode of the control.This property can be used to set the text search mode.
Declaration
public ComboBoxTextSearchMode TextSearchMode { get; set; }
Property Value
Type | Description |
---|---|
ComboBoxTextSearchMode | Specifies the text search mode.The default value is StartsWith |
TokensWrapMode
Gets or sets the value indicating the orientation of items, either vertically or horizontally.
Declaration
public ComboBoxTokensWrapMode TokensWrapMode { get; set; }
Property Value
Type | Description |
---|---|
ComboBoxTokensWrapMode | The default value is none. |
VerticalTextAlignment
Gets or sets a value to change the vertical alignment of text within the SfComboBox control.
Declaration
public TextAlignment VerticalTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.TextAlignment | Specifies the text alignment.The default value is Microsoft.Maui.TextAlignment.Center. |
Methods
Finalize()
Destructor of the SfComboBox class.
Declaration
protected override void Finalize()
Overrides
GetSemanticsNodesCore(Double, Double)
Declaration
protected override List<SemanticsNode> GetSemanticsNodesCore(double width, double height)
Parameters
Type | Name | Description |
---|---|---|
System.Double | width | |
System.Double | height |
Returns
Type |
---|
System.Collections.Generic.List<Syncfusion.Maui.Graphics.Internals.SemanticsNode> |
Overrides
OnHandlerChanged()
Handler changed event.
Declaration
protected override void OnHandlerChanged()