menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class SfAutocomplete

    SfAutocomplete provides a simpler way to complete the text based on the characters that the user has entered before. It also provides option to choose a suggestion from drop down or append a suggestion to the text directly.

    Inheritance
    System.Object
    SfView
    SfDropdownEntry
    DropDownListBase
    SfAutocomplete
    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 SfAutocomplete : 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

    SfAutocomplete()

    Initializes a new instance of the SfAutocomplete class.

    Declaration
    public SfAutocomplete()

    Fields

    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

    Identifies FilterBehavior bindable property.

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

    The identifier for the FilterBehavior bindable property.

    HorizontalTextAlignmentProperty

    Gets or sets the value of HorizontalTextAlignment. This property can be used to give HorizontalTextAlignment to the Text in Autocomplete control.This is Bindable Property.

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

    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.

    SearchBehaviorProperty

    Identifies SearchBehavior bindable property.

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

    The identifier for the SearchBehavior bindable property.

    SelectionModeProperty

    Identifies SelectionMode dependency property.

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

    The identifier for the SelectionMode dependency property.

    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 dependency property.

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

    The identifier for the TokensWrapMode dependency property.

    VerticalTextAlignmentProperty

    Gets or sets the value of VerticalTextAlignment. This property can be used to give VerticalTextAlignment to the Text in Autocomplete control.This is Bindable Property.

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

    Properties

    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

    Filter behaviour property.

    Declaration
    public IAutocompleteFilterBehavior FilterBehavior { get; set; }
    Property Value
    Type
    IAutocompleteFilterBehavior

    HorizontalTextAlignment

    Gets or sets a value to change the horizontal alignment of text within the SfAutocomplete  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.

    MultiSelectionDisplayMode

    Gets or sets the multi selection mode for the SfAutocomplete control.

    Declaration
    public AutocompleteMultiSelectionDisplayMode MultiSelectionDisplayMode { get; set; }
    Property Value
    Type
    AutocompleteMultiSelectionDisplayMode

    SearchBehavior

    Search behaviour property.

    Declaration
    public IAutocompleteSearchBehavior SearchBehavior { get; set; }
    Property Value
    Type
    IAutocompleteSearchBehavior

    SelectionMode

    Gets or sets the selection behavior for the SfAutocomplete control.

    Declaration
    public AutocompleteSelectionMode SelectionMode { get; set; }
    Property Value
    Type Description
    AutocompleteSelectionMode

    A value that indicates the selection behavior for a Autocomplete control. The default value is Single. Fields:

    EnumerationDescription
    SingleAllows to select a single item from a list.
    MultipleAllows to select one or more items from a list.
    Remarks

    Allows to select either a single item or multiple items.

    ShowBorder

    Gets or sets a value indicating whether to show or hide the border of the SfAutocomplete  control.

    Declaration
    public bool ShowBorder { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true.

    TextSearchMode

    Gets or sets the TextSearchMode to search the item which matches the search text either with the beginning of the texts or contains the search text in the list.

    Declaration
    public AutocompleteTextSearchMode TextSearchMode { get; set; }
    Property Value
    Type Description
    AutocompleteTextSearchMode

    A value that indicates the text search behavior for a Autocomplete control. The default value is StartsWith. Fields:

    EnumerationDescription
    StartsWithSearch the item which matches the search text with the beginning of the texts in the list.
    ContainsSearch the item which contains the search text in the list.

    TokensWrapMode

    Gets or sets the value indicating the orientation of items, either vertically or horizontally.

    Declaration
    public AutocompleteTokensWrapMode TokensWrapMode { get; set; }
    Property Value
    Type Description
    AutocompleteTokensWrapMode

    The default value is none.

    VerticalTextAlignment

    Gets or sets a value to change the vertical alignment of text within the SfAutocomplete  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 SfAutocomplete class.

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

    GetSemanticsNodesCore(Double, Double)

    Returns the semantics node list

    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.

    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<AutocompleteValueChangedEventArgs> ValueChanged
    Event Type
    Type
    System.EventHandler<AutocompleteValueChangedEventArgs>
    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