Telerik UI for Windows Phone by Progress

In cases when you do not want to display suggestions in a popup, RadAutoCompleteBox allows for binding a separate control which will be used to display filtered suggestions. This can be done by using the FilteredSuggestions property.

Using the FilteredSuggestions property

The FilteredSuggestions property returns an array of suggestions that are available based on the current user input. You can use this property as a data source for any list control to display filtered suggestions in it. If you also wish to prevent the suggestions popup from being displayed, you can use the PopupDisplayMode property and set it to None.

The following XAML code snippet demonstrates a simple scenario where the suggestions provided by RadAutoCompleteBox are displayed in a RadDataBoundListBox put below RadAutoCompleteBox on the page:

<Grid x:Name="LayoutRoot">
        <RowDefinition Height="Auto"/>
    <telerikInput:RadAutoCompleteBox PopupDisplayMode="None" x:Name="radAutoCompleteBox" Grid.Row="0"/>
    <telerikPrimitives:RadDataBoundListBox ItemsSource="{Binding ElementName=radAutoCompleteBox, Path=FilteredSuggestions}" Grid.Row="1" x:Name="dataBoundListBox">
                <TextBlock Text="{Binding}"/>

Using the EmptyFilterBehavior property

The EmptyFilterBehavior property allows you to adjust how the RadAutoCompleteBox control generates filtered suggestions when the user resets the current input. There are two modes available:

  • ShowNone - no suggestions are shown when the input is cleared
  • ShowAll - all available suggestions are shown when the input is cleared

A sample scenario where the EmptyFilterBehavior property is useful is when the filtered suggestions are not displayed in a popup. For instance if you use a list box control to display the filtered suggestions via the FilteredSuggestions property you might want to have all potential suggestions loaded initially or when the input is cleared.

See Also