Reputation: 11
I am exploring Reactive UI. I have an ObservableCollection of models in which objects are added at a very high speed. I handle the collectionchanged event and add viewModels for each model in another ObservableCollection. Can we suppress the CollectionChanged event for Model list and raise an event for a bunch of records or after a specified time interval has lapsed?
Upvotes: 1
Views: 237
Reputation: 74652
Yes, here's how to do it:
using (someReactiveCollection.SuppressChangeNotifications()) {
// TODO: Add a bunch of items
}
Upvotes: 2