title: Replace Entire ObservableCollection with another ObservableCollection
body: <pre><code>public class Alpha
  {
      public ObservableCollection&lt;Beta&gt; Items { get; set; }
  
      public Alpha()
      {
          Items = new ObservableCollection&lt;Beta&gt;();
      }
  
      public void DoSomething()
      {
          Items = GetNewItems();  // whenever I do this, Items gets a new referene, 
                                  // so every WPF binding (e.g. datagrids) are broken
      }
  
      public ObservableCollection&lt;Beta&gt; GetNewItems()
      {
           var ret = new ObservableCollection&lt;Beta&gt;();
           // some logic for getting some items from somewhere, and populating ret
           return ret;
      }
  }
  </code></pre>
  
  <p>How can I replace the whole content of <code>Items</code> with the return value of <code>GetNewItems()</code> without:</p>
  
  <ol>
  <li><p>Breaking the bindings.</p></li>
  <li><p>Having to loop through the items and copy them one by one to the other collection ?</p></li>
  </ol>