Class AutoCompleteFilterBehavior
Represents a filtering behavior for SfAutoComplete. Using the text entered in control, suggestion list gets created based on TextSearchMode. We can override this and show custom suggestions which gets loaded either asynchronously or synchronously.
Inheritance
System.Object
AutoCompleteFilterBehavior
Implements
Namespace: Syncfusion.UI.Xaml.Editors
Assembly: Syncfusion.Editors.WinUI.dll
Syntax
public class AutoCompleteFilterBehavior : Object, IAutoCompleteFilterBehavior
Remarks
By default, the suggestions gets loaded asynchronously.
Constructors
AutoCompleteFilterBehavior()
Declaration
public AutoCompleteFilterBehavior()
Methods
GetMatchingItemsAsync(SfAutoComplete, AutoCompleteFilterInfo)
Gets the matching items based on typed text. These matching items can either be loaded asynchronously or synchronously.
Declaration
public virtual Task<object> GetMatchingItemsAsync(SfAutoComplete source, AutoCompleteFilterInfo filterInfo)
Parameters
Type | Name | Description |
---|---|---|
SfAutoComplete | source | The AutoComplete control. |
AutoCompleteFilterInfo | filterInfo | Contains details regarding search text of AutoComplete control. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The custom items source based on typed text. |
Remarks
To load asynchronously, return await Task.Run(...); To load synchronously, return await Task.FromResult(...);