コード例 #1
0
        private bool ItemMatches(string filter, CollectionViewGalleryTestItem item)
        {
            if (String.IsNullOrEmpty(filter))
            {
                return(true);
            }

            return(item.Date.DayOfWeek.ToString().ToLower().Contains(filter.ToLower()));
        }
コード例 #2
0
        private bool ItemMatches(string filter, CollectionViewGalleryTestItem item)
        {
            if (String.IsNullOrEmpty(filter))
            {
                return(true);
            }

            return(item.Date.DayOfWeek.ToString().Contains(filter, StringComparison.OrdinalIgnoreCase));
        }
コード例 #3
0
        protected override void ModifyObservableCollection(ObservableCollection <CollectionViewGalleryTestItem> observableCollection, params int[] indexes)
        {
            var index = indexes[0];

            if (index > -1 && index <= observableCollection.Count)
            {
                var item = new CollectionViewGalleryTestItem(DateTime.Now, "Inserted", "oasis.jpg", index);
                observableCollection.Insert(index, item);
            }
        }
コード例 #4
0
        protected override void ModifyObservableCollection(ObservableCollection <CollectionViewGalleryTestItem> observableCollection, params int[] indexes)
        {
            var index = indexes[0];

            if (index > -1 && index < observableCollection.Count)
            {
                var replacement = new CollectionViewGalleryTestItem(DateTime.Now, "Replacement", "coffee.png", index);
                observableCollection[index] = replacement;
            }
        }
コード例 #5
0
 private bool ItemMatches(string filter, CollectionViewGalleryTestItem item)
 {
     filter = filter ?? "";
     return(item.Caption.Contains(filter, StringComparison.OrdinalIgnoreCase));
 }
コード例 #6
0
        protected override void ModifyObservableCollection(ObservableCollection <CollectionViewGalleryTestItem> observableCollection, params int[] indexes)
        {
            var item = new CollectionViewGalleryTestItem(DateTime.Now, "Added", "oasis.jpg", observableCollection.Count);

            observableCollection.Add(item);
        }
コード例 #7
0
 private bool ItemMatches(string filter, CollectionViewGalleryTestItem item)
 {
     filter = filter ?? "";
     return(item.Caption.ToLower().Contains(filter?.ToLower()));
 }