.NET MAUI AutoComplete Data Binding
For all cases where the business items are not simple strings, data-binding is necessary to correctly visualize information. The AutoComplete for .NET MAUI component supports data binding in the form of path properties.
-
TextSearchPath
(string
)—Defines the name of the property the search function will be executed against.
The
TextSearchPath
property is required in data-binding scenarios.
The AutoComplete component provides a default template for suggestion items that cannot be modified. You can use a custom template if you need to customize the suggestion items.
Example
Here is an example how the RadAutoComplete
Data Binding works:
1. Create the needed business objects, for example type Client with the following properties:
2. Create a ViewModel with a collection of Client objects:
3. Use the following snippet to declare a RadAutoComplete
in XAML:
For AutoComplete Data Binding example refer to the SDKBrowser Demo application.