title: WPF ListBox displays duplicate items. How to get around?
body: <p>I have a ListBox with a nested ListBox inside. Both have ObservableCollections as their ItemsSource set with the inner ListBox's collection being a member of the outer one's Objects...</p>
  
  <p>The collections are filled by a BackgroundWorker which gathers data from a webservice. I had to change from ObservableCollection to an AsyncObservableCollection in order to be able to add items from within the worker's code. AsyncObservableCollection code is from here: <a href="http://geekswithblogs.net/NewThingsILearned/archive/2008/01/16/have-worker-thread-update-observablecollection-that-is-bound-to-a.aspx" rel="noreferrer">Have worker thread update ObservableCollection that is bound to a ListCollectionView</a></p>
  
  <p>My problem is that the inner ListBox keeps to display duplicate items. It seems as if it always duplicates the first item if it decides to duplicate. I have no clue why this happens. With an event listener attached to the CollectionChanged event of the collection I found out that the event is being fired fine once per item.</p>
  
  <p>Do you have any ideas?</p>
  
  <p>Thanks,
  Stephan</p>