title: How to Avoid Firing ObservableCollection.CollectionChanged Multiple Times When Replacing All Elements Or Adding a Collection of Elements
body: <p>I have <code>ObservableCollection&lt;T&gt;</code> collection, and I want to replace all elements with a new collection of elements, I could do:</p>
  
  <pre><code>collection.Clear(); 
  </code></pre>
  
  <p>OR: </p>
  
  <pre><code>collection.ClearItems();
  </code></pre>
  
  <p>(BTW, what's the difference between these two methods?)</p>
  
  <p>I could also use <code>foreach</code> to <code>collection.Add</code> one by one, but this will fire multiple times</p>
  
  <p>Same when adding a collection of elements.</p>
  
  <p>EDIT:</p>
  
  <p>I found a good library here: <a href="http://www.codeproject.com/Articles/249311/Enhanced-ObservableCollection" rel="noreferrer">Enhanced ObservableCollection with ability to delay or disable notifications</a> but it seems that it does NOT support silverlight.</p>