ObservableCollection
provides the CollectionChanged
event whenevet we add, remove or update the item from the colleciton, but it raises the event for individual item change, for example, whenever I add the new item to the collection it raises the collection.
Now, what I want is to raise the event after completing all the modifications to the collection, for example, I need to add 2 items, delete one item and update 2 items. The CollectionChanged
event should only fire after completiong all these add, delete and update.
Or, suppose I have a new collection with all the modifications, now , i want to raise the CollectionChanged
when I assign the new collection, for example:
ObservableCollection<string> mainCollection; //assume it has some items
mainCollection = updatedCollection; // at this point I want to raise the event.
Please provide your valuable suggestions.
Regards,
BHavik