Sorting data in ListView
问题 I have a ListView in my XAML: <ListView Margin="10" Name="lvDataBinding"></ListView> In the code I have User class: public class User { public string Name { get; set; } public int Age { get; set; } public override string ToString { return this.Name + ", " + this.Age + " years old"; } } and code that binds the collection of Users to ListView: List<User> items = new List<User>(); items.Add(new User() { Name = "John Doe", Age = 42 }); items.Add(new User() { Name = "Jane Doe", Age = 39 }); items