New to Telerik UI for Xamarin? Download free 30-day trial

Suggest Mode

RadAutoCompleteView exposes three different modes for providing suggestions:

  • Suggest: Provides a drop-down list of options for you to pick from;
  • Append: Provides an inline display of the first suggestion;
  • SuggestAppend: Combines the functionality of the two options above, shows a drop-down with suggestions and at the same time selects the first one from the list.

In order to choose any of those modes you should set the SuggestMode property of the control. The default SuggestMode is "Suggest".


Here is an example how the RadAutoCompleteView Suggest Mode functionality works:

First, create the needed business objects, for example type Client with the following properties:

public class Client
    public Client(string name, string email, string imageSource)
        this.Name = name;
        this.Email = email;
        this.ImageSource = imageSource;
    public string Name { get; set; }
    public string Email { get; set; }
    public string ImageSource { get; set; }

Then create a ViewModel with a collection of Client objects:

public class ViewModel
    public ObservableCollection<Client> Source { get; set; }
    public ViewModel()
        this.Source = new ObservableCollection<Client>()
            new Client("Freda Curtis", "", "available32.png"),
            new Client("Jeffery Francis", "", "away32.png"),
            new Client("Eva Lawson", "", "available32.png"),
            new Client("Emmett Santos", "", "busy32.png"),
            new Client("Theresa Bryan", "", "available32.png"),
            new Client("Jenny Fuller", "", "busy32.png"),
            new Client("Terrell Norris", "", "away32.png"),
            new Client("Eric Wheeler", "", "away32.png"),
            new Client("Nida Carty", "", "away32.png"),
            new Client("Niki Samaniego", "", "busy32.png")

For example SuggestMode="Suggest" property can be declared through XAML using the following snippet:

<telerikInput:RadAutoCompleteView x:Name="autoCompleteViewSuggest"
                                  ItemsSource="{Binding Source}"
                                  Watermark="AutoCompleteView Suggest"

Here is the result when SuggestMOde is set to Suggest:

AutoCompleteView Suggest

For SuggestMode="Append":

<telerikInput:RadAutoCompleteView x:Name="autoCompleteViewAppend"
                                  ItemsSource="{Binding Source}"
                                  Watermark="AutoCompleteView Append"

And the final result:

AutoCompleteView Append

And finaly SuggestMode="SuggestAppend" is declared as follow:

<telerikInput:RadAutoCompleteView x:Name="autoCompleteViewSuggestAppend"
                                  ItemsSource="{Binding Source}"
                                  Watermark="AutoCompleteView SuggestAppend"

Here is the result:

AutoCompleteView SuggestAppend

A sample Suggest Mode example can be found in the AutoCompleteView/Features folder of the SDK Samples Browser application.

See Also

In this article