public EmptyViewViewGallery() { InitializeComponent(); CollectionView.ItemTemplate = ExampleTemplates.PhotoTemplate(); CollectionView.ItemsSource = _demoFilteredItemSource.Items; SearchBar.SearchCommand = new Command(() => _demoFilteredItemSource.FilterItems(SearchBar.Text)); }
public FilterSelection() { InitializeComponent(); CollectionView.ItemsSource = _demoFilteredItemSource.Items; SearchBar.SearchCommand = new Command(() => { _demoFilteredItemSource.FilterItems(SearchBar.Text); }); ResetButton.Clicked += ResetButtonClicked; }
public DataTemplateSelectorGallery() { InitializeComponent(); _demoFilteredItemSource = new DemoFilteredItemSource(filter: ItemMatches); CollectionView.ItemsSource = _demoFilteredItemSource.Items; SearchBar.SearchCommand = new Command(() => { _demoFilteredItemSource.FilterItems(SearchBar.Text); CollectionView.EmptyView = SearchBar.Text; }); }
public EmptyViewTemplateGallery() { InitializeComponent(); CollectionView.ItemTemplate = ExampleTemplates.PhotoTemplate(); CollectionView.ItemsSource = _demoFilteredItemSource.Items; CollectionView.EmptyView = _emptyViewGalleryFilterInfo; SearchBar.SearchCommand = new Command(() => { _demoFilteredItemSource.FilterItems(SearchBar.Text); _emptyViewGalleryFilterInfo.Filter = SearchBar.Text; }); }
private void SearchBarTextChanged(object sender, TextChangedEventArgs e) { _demoFilteredItemSource.FilterItems(SearchBar.Text); }
void SearchBarOnTextChanged(object sender, TextChangedEventArgs e) { _demoFilteredItemSource.FilterItems(e.NewTextValue); }