title: How to update items in listbox from new instances without flickering?
body: <p>I have a <code>ListBox</code> bound to <code>ObservableCollection</code> with some items. They could be instances of base class or some inherited classes. I need to update item list once in 3 seconds. To update collection list item provider downloads new list and then I need to merge old and new lists. Items in old and new lists are associated using <code>Item.Id</code> property. The problem is how to update items in listbox without flickering and to preserve current selection etc.</p>
  
  <p>There are two ways to do that</p>
  
  <ol>
  <li><p>Do <code>list.RemoveAt()</code> and then <code>list.InsertAt()</code> to replace all items. Also it's useful to use <code>CollectionViewSource.DeferRefresh()</code> and save current selection before update and restore after. With this approach I encountered some issues like tooltip flickering etc.</p></li>
  <li><p>The other way is to update each property of old items with new values. But this is kind of difficult because there are some inherited instances in the collection.</p></li>
  </ol>
  
  <p>What is the proper way to handle such situation? How to efficiently implement live data updates (when updates are downloaded in new instance collection)?</p>