beta.blog

Programming

WPF: ListView with Ascending/Descending Sorting

by on Feb.22, 2013, under Programming

Brief example code of how to add ascending or descending sorting to your ListView in WPF:

Ascending sorting:

ListView1.Items.SortDescriptions.Add(new System.ComponentModel.SortDescription("Content", System.ComponentModel.ListSortDirection.Ascending));

Descending sorting:

ListView1.Items.SortDescriptions.Add(new System.ComponentModel.SortDescription("Content", System.ComponentModel.ListSortDirection.Descending));
1 Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!