ImageAlbums is an ICollectionView type and GlobalCollection.MyImageAlubms is an ObservableCollection<T> type.
ImageAlbums = CollectionViewSource.GetDefaultView(GlobalCollection.MyImageAlubms);
ImageAlbums.Filter = new Predicate<object>(this.FilterImageAlbumList);
In a view I'm using ImageAlbums for showing a filtered image list. I have filtered the list using FilterImageAlbumList method. The problem is I have used the GlobalCollection.MyImageAlubms in another place. In that view I have used the GlobalCollection.MyImageAlubms directly as source but in there the list are being showed as filtered also. I am also providing the filter method here, following code represents the filter method
private bool FilterImageAlbumList(object item)
{
AlbumModel albumMoel = (AlbumModel)item;
if(LOGIC_OF_FILTERING)
{
return false;
}
return true;
}
Is there any way to filter only ImageAlbums without affecting the GlobalCollection. FYI - I won't deep copy the Global Collection.