AutoComplete supports multiple filtering criteria that can be used to filter the items list based on the user input. These filtering criteria are defined in the AutoCompleteMode enumeration and can be set using the AutoCompleteMode property. The AutoCompleteMode property works as a series of flags, therefore, you can also set multiple filtering criteria. AutoCompleteMode enumeration specifies the mode for automatic completion in the control through following values:
The following GIF image shows how the AutoComplete control appears after setting the AutoCompleteMode property.
The following code example shows setting the auto complete mode feature in the AutoComplete control.
C# |
コードのコピー
|
---|---|
autoComplete.AutoCompleteMode = AutoCompleteMode.Contains | AutoCompleteMode.StartsWith; |
XAML |
コードのコピー
|
---|---|
<c1:C1AutoComplete x:Name="autoComplete" ItemsSource="{Binding ItemsSource}" DisplayMemberPath="Name" HorizontalOptions="FillAndExpand" AutoCompleteMode="Contains"></c1:C1AutoComplete> |