I am using a ListView which is bound to a ICollectionView (ListCollectionView -> ObservableCollection) While loading a file containing data the collection gets filled. Every data item has a boolean flag, which indicates if it must be shown in the listview or must be hidden.
Currently I have done this in an ugly way. I am filling first the collection (listview) with data. The user can see this. After filling it I start a routine which filters (ICollectionView.Filter) the items, which do not match. The listview item count shrink at that moment.
Is there a better way to implement this?
Just set the Filter before you start filling the collection: