title: What causes a WPF ListCollectionView that uses custom sorting to re-sort its items?
body: <p>Consider this code (type names genericised for the purposes of example):</p>
  
  <pre><code>// Bound to ListBox.ItemsSource
  _items = new ObservableCollection&lt;Item&gt;();
  
  // ...Items are added here ...
  
  // Specify custom IComparer for this collection view
  _itemsView = CollectionViewSource.GetDefaultView(_items)
  ((ListCollectionView)_itemsView).CustomSort = new ItemComparer();
  </code></pre>
  
  <p>When I set <code>CustomSort</code>, the collection is sorted as I expect.</p>
  
  <p>However I require the data to re-sort itself at runtime in response to the changing of the properties on <code>Item</code>.  The <code>Item</code> class derives from <code>INotifyPropertyChanged</code> and I know that the property fires correctly as my data template updates the values on screen, only the sorting logic is not being called.</p>
  
  <p>I have also tried raising <code>INotifyPropertyChanged.PropertyChanged</code> passing an empty string, to see if a generic notification would cause the sorting to be initiated.  No bananas.</p>
  
  <p><strong>EDIT</strong> In response to Kent's suggestion I thought I'd point out that sorting the items using this has the same result, namely that the collection sorts once but <em>does not</em> re-sort as the data changes:</p>
  
  <pre><code>_itemsView.SortDescriptions.Add(
      new SortDescription("PropertyName", ListSortDirection.Ascending));
  </code></pre>