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.
Implements
Inherited Members
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:
|
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:
|
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
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
OnHandlerChanged()
Handler changed.
Declaration
protected override void OnHandlerChanged()