👩💻 Join our community of thousands of amazing developers!
# 使用示例using (collection.BatchUpdate()){ collection.Add(...); ... // Some Addition collection.Remove(...); ... // Some Removal}// And then only one time OnCollectionChanged trigged.# 实现代码public class BulkObservableCollection<T> : ObservableCollection<T>{ protected bool _suppressNotification = false; protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e) { if (!_suppressNotification) base.OnCollectionChanged(e); } public IDispos...