WPF 4, ListView and ListCollectionView custom sorting
Posted
by JustABill
on Stack Overflow
See other posts from Stack Overflow
or by JustABill
Published on 2010-05-12T00:45:09Z
Indexed on
2010/05/12
1:14 UTC
Read the original article
Hit count: 441
I'm trying to use a custom sort with a ListView, as described in this blog entry.
I'm doing
ListCollectionView view = (ListCollectionView)CollectionViewSource.GetDefaultView(TheList.ItemsSource);
as recommended there and in several other places, but for some reason I'm getting "Unable to cast object of type 'MS.Internal.Data.EnumerableCollectionView' to type 'System.Windows.Data.ListCollectionView'." (TheList is of type ListView).
What could be causing this?
© Stack Overflow or respective owner