menu

MAUI

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

    Show / Hide Table of Contents

    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.

    Inheritance
    System.Object
    SfView
    SfDropdownEntry
    DropDownListBase
    SfComboBox
    Implements
    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<Microsoft.Maui.IView>
    System.Collections.Generic.ICollection<Microsoft.Maui.IView>
    System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Inherited Members
    DropDownListBase.ArrangeContent(Rect)
    DropDownListBase.Clear()
    DropDownListBase.Completed
    DropDownListBase.DelimiterText
    DropDownListBase.DelimiterTextProperty
    DropDownListBase.DisplayMemberPath
    DropDownListBase.DisplayMemberPathProperty
    DropDownListBase.DropDownBackground
    DropDownListBase.DropDownBackgroundProperty
    DropDownListBase.DropDownClosed
    DropDownListBase.DropdownFooterView
    DropDownListBase.DropdownFooterViewHeight
    DropDownListBase.DropdownFooterViewHeightProperty
    DropDownListBase.DropdownFooterViewProperty
    DropDownListBase.DropdownHeaderView
    DropDownListBase.DropdownHeaderViewHeight
    DropDownListBase.DropdownHeaderViewHeightProperty
    DropDownListBase.DropdownHeaderViewProperty
    DropDownListBase.DropDownItemFontAttributes
    DropDownListBase.DropDownItemFontAttributesProperty
    DropDownListBase.DropDownItemFontFamily
    DropDownListBase.DropDownItemFontFamilyProperty
    DropDownListBase.DropDownItemFontSize
    DropDownListBase.DropDownItemFontSizeProperty
    DropDownListBase.DropDownItemHeight
    DropDownListBase.DropDownItemHeightProperty
    DropDownListBase.DropDownItemTextColor
    DropDownListBase.DropDownItemTextColorProperty
    DropDownListBase.DropDownPlacement
    DropDownListBase.DropDownPlacementProperty
    DropDownListBase.DropDownStroke
    DropDownListBase.DropDownStrokeProperty
    DropDownListBase.DropDownStrokeThickness
    DropDownListBase.DropDownStrokeThicknessProperty
    DropDownListBase.DropdownWidth
    DropDownListBase.DropdownWidthProperty
    DropDownListBase.Focused
    DropDownListBase.HighlightedTextColor
    DropDownListBase.HighlightedTextColorProperty
    DropDownListBase.HighlightedTextFontAttributes
    DropDownListBase.HighlightedTextFontAttributesProperty
    DropDownListBase.IsDropDownShadowVisible
    DropDownListBase.IsDropDownShadowVisibleProperty
    DropDownListBase.ItemPadding
    DropDownListBase.ItemPaddingProperty
    DropDownListBase.ItemsSource
    DropDownListBase.ItemsSourceProperty
    DropDownListBase.ItemTemplate
    DropDownListBase.ItemTemplateProperty
    DropDownListBase.LoadMoreButtonTapped
    DropDownListBase.LoadMoreTemplate
    DropDownListBase.LoadMoreTemplateProperty
    DropDownListBase.LoadMoreText
    DropDownListBase.LoadMoreTextProperty
    DropDownListBase.MaximumSuggestion
    DropDownListBase.MaximumSuggestionProperty
    DropDownListBase.MinimumPrefixCharacters
    DropDownListBase.MinimumPrefixCharactersProperty
    DropDownListBase.NoResultsFoundTemplate
    DropDownListBase.NoResultsFoundTemplateProperty
    DropDownListBase.NoResultsFoundText
    DropDownListBase.NoResultsFoundTextProperty
    DropDownListBase.OnPropertyChanged(String)
    DropDownListBase.OnSizeAllocated(Double, Double)
    DropDownListBase.ReturnCommand
    DropDownListBase.ReturnCommandParameter
    DropDownListBase.ReturnCommandParameterProperty
    DropDownListBase.ReturnCommandProperty
    DropDownListBase.ReturnType
    DropDownListBase.ReturnTypeProperty
    DropDownListBase.SelectedDropDownItemBackground
    DropDownListBase.SelectedDropDownItemBackgroundProperty
    DropDownListBase.SelectedItem
    DropDownListBase.SelectedItemProperty
    DropDownListBase.SelectedItems
    DropDownListBase.SelectedItemsProperty
    DropDownListBase.SelectedValue
    DropDownListBase.SelectedValuePath
    DropDownListBase.SelectedValuePathProperty
    DropDownListBase.SelectedValueProperty
    DropDownListBase.SelectionChanged
    DropDownListBase.SelectionChanging
    DropDownListBase.SelectionTextHighlightColor
    DropDownListBase.SelectionTextHighlightColorProperty
    DropDownListBase.ShowDropdownFooterView
    DropDownListBase.ShowDropdownFooterViewProperty
    DropDownListBase.ShowDropdownHeaderView
    DropDownListBase.ShowDropdownHeaderViewProperty
    DropDownListBase.ShowSuggestionsOnFocus
    DropDownListBase.ShowSuggestionsOnFocusProperty
    DropDownListBase.Text
    DropDownListBase.TextHighlightMode
    DropDownListBase.TextHighlightModeProperty
    DropDownListBase.TextMemberPath
    DropDownListBase.TextMemberPathProperty
    DropDownListBase.TextProperty
    DropDownListBase.TokenItemStyle
    DropDownListBase.TokenItemStyleProperty
    DropDownListBase.Unfocused
    SfDropdownEntry.ClearButtonIconColor
    SfDropdownEntry.ClearButtonIconColorProperty
    SfDropdownEntry.ClearButtonPath
    SfDropdownEntry.ClearButtonPathProperty
    SfDropdownEntry.CursorPosition
    SfDropdownEntry.CursorPositionProperty
    SfDropdownEntry.DropDownClosing
    SfDropdownEntry.DropdownOpened
    SfDropdownEntry.DropdownOpening
    SfDropdownEntry.Focus()
    SfDropdownEntry.FontAttributes
    SfDropdownEntry.FontAttributesProperty
    SfDropdownEntry.FontAutoScalingEnabled
    SfDropdownEntry.FontAutoScalingEnabledProperty
    SfDropdownEntry.FontFamily
    SfDropdownEntry.FontFamilyProperty
    SfDropdownEntry.FontSize
    SfDropdownEntry.FontSizeProperty
    SfDropdownEntry.IsClearButtonVisible
    SfDropdownEntry.IsClearButtonVisibleProperty
    SfDropdownEntry.IsDropDownOpen
    SfDropdownEntry.IsDropDownOpenProperty
    SfDropdownEntry.MaxDropDownHeight
    SfDropdownEntry.MaxDropDownHeightProperty
    SfDropdownEntry.MeasureContent(Double, Double)
    SfDropdownEntry.OnDraw(ICanvas, RectF)
    SfDropdownEntry.OnDropdownOpening()
    SfDropdownEntry.OnFontChanged(Font, Font)
    SfDropdownEntry.Placeholder
    SfDropdownEntry.PlaceholderColor
    SfDropdownEntry.PlaceholderColorProperty
    SfDropdownEntry.PlaceholderProperty
    SfDropdownEntry.Stroke
    SfDropdownEntry.StrokeProperty
    SfDropdownEntry.TextColor
    SfDropdownEntry.TextColorProperty
    SfDropdownEntry.Unfocus()
    SfView.ArrangeOverride(Rect)
    SfView.Children
    SfView.ClipToBounds
    SfView.IDrawableLayout.DrawingOrder
    SfView.IDrawableLayout.InvalidateDrawable()
    SfView.MeasureOverride(Double, Double)
    SfView.OnBindingContextChanged()
    SfView.Padding
    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 null.

    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 false.

    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 false

    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 -1, which indicates that no item is selected.

    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
    DropDownListBase.Finalize()

    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
    SfView.GetSemanticsNodesCore(Double, Double)

    OnHandlerChanged()

    Handler changed event.

    Declaration
    protected override void OnHandlerChanged()
    Overrides
    DropDownListBase.OnHandlerChanged()

    OnValueChanged(String, String)

    Triggers the ValueChanged event for the TextBox. This method is called whenever the value of the textbox changes.

    Declaration
    protected void OnValueChanged(string oldValue, string newValue)
    Parameters
    Type Name Description
    System.String oldValue

    The previous value of the textbox before the change.

    System.String newValue

    The new value of the textbox after the change.

    Events

    ValueChanged

    Occurs when the value of the control changes.

    Declaration
    public event EventHandler<ComboBoxValueChangedEventArgs> ValueChanged
    Event Type
    Type
    System.EventHandler<ComboBoxValueChangedEventArgs>
    Remarks

    This event is triggered when there is a change in the value of the textbox. It provides the old and the new values in the form of ValueChangedEventArgs.

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved