OptimizedObservableCollection - markjulmar/xamu-infrastructure GitHub Wiki
This class provides a derived version of the ObservableCollection<T> which allows you to turn change notifications off for a period of time. This is useful if a lot of data is going to change in the collection at once to avoid a bunch of binding updates being done serially.
-
BeginMassUpdate: turns off change notifications and returns anIDisposableobject which must be disposed to turn them back on.
var collection = new OptimizedObservableCollection<string>() { ... };
using (collection.BeginMassUpdate())
{
.. // Do a bunch of changes here.
} // UI is notified about all changes here.