示例#1
0
        public EmptyViewViewGallery()
        {
            InitializeComponent();

            CollectionView.ItemTemplate = ExampleTemplates.PhotoTemplate();

            CollectionView.ItemsSource = _demoFilteredItemSource.Items;

            SearchBar.SearchCommand = new Command(() => _demoFilteredItemSource.FilterItems(SearchBar.Text));
        }
示例#2
0
        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;
            });
        }
示例#5
0
 private void SearchBarTextChanged(object sender, TextChangedEventArgs e)
 {
     _demoFilteredItemSource.FilterItems(SearchBar.Text);
 }
 void SearchBarOnTextChanged(object sender, TextChangedEventArgs e)
 {
     _demoFilteredItemSource.FilterItems(e.NewTextValue);
 }