Skip to content

hoveytechllc/SearchableComboBox.UWP

Repository files navigation

Build Status

Searchable ComboBox for UWP

Single UserControl that includes:

  • TextBox for filter input
  • ProgressRing for async/background search

Minimum Supported UWP Build: 15063

Getting Started

Install using NuGet:

Install-Package HoveyTech.SearchableComboBox.UWP

Basic setup:

Setup binding for SelectedEntity, FilterText and List.

 <uwp:SearchableComboBox SelectedItem="{Binding SelectedEntity, Mode=TwoWay}"
        FilterText="{Binding FilterText, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
        ItemsSource="{Binding List}">
</uwp:SearchableComboBox >

NOTE: UserControl does not filter ItemsSource. The ViewModel must filter ItemsSource using FilterText property and update List property.

ProgressRing

ProgressRing

Set UseLoadingProgressRing to True. Whenever FilterText changes on ViewModel update IsRefreshingItemsSource binding.

 <uwp:SearchableComboBox SelectedItem="{Binding SelectedEntity, Mode=TwoWay}"
        FilterText="{Binding FilterText, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
        ItemsSource="{Binding List}"
        UseLoadingProgressRing="True"
        IsRefreshingItemsSource="{Binding IsSearching}">
</uwp:SearchableComboBox >

PlaceHolder & No items message

PlaceHolder:

PlaceHolderText

ItemsSourceEmptyMessage

Set PlaceholderText to custom message (default: empty). Set ItemsSourceEmptyMessage to custom message (default: "No items...").

 <uwp:SearchableComboBox SelectedItem="{Binding SelectedEntity, Mode=TwoWay}"
        FilterText="{Binding FilterText, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
        ItemsSource="{Binding List}"
        PlaceholderText="Tap to select person..."
        ItemsSourceEmptyMessage="No-one found by that name...">
</uwp:SearchableComboBox >

About

Searchable UWP ComboBox with support for user filtering & searching indicator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages