Hi !
myListBox.Items.SortDescriptions.Add(
new SortDescription("BoolProperty", ListSortDirection.Descending));
This sorting works only for string properties of the underlying project. Not with boolean? Is there a reason for that ?
Thanks !
UPDATE:
Yep, your example really works. But what's wrong on my example ?
public class A
{
public bool Prop;
}
List<A> l = new List<A>() {
new A() { Prop = true },
new A() { Prop = false },
new A() { Prop = true },
};
ICollectionView icw = CollectionViewSource.GetDefaultView(l);
icw.SortDescriptions.Add(new SortDescription("Prop", ListSortDirection.Ascending));
icw.Refresh();