SortDescription with converter
I have list<Person> Persons
Person has ID, something like that:12231d4sa32fd
I have a converter that convert the ID to Status: (Ready/Waiting/NotHere).
I show the list in a ListView.
Question: How can I 开发者_如何学Pythonsort the ListView by the Person's status ?
One option is to add a Status
property to your Person
type and bind to that in your grid instead. If you don't wish to add a Status
property to your model, then you could create a PersonViewModel
instead with this additional property, and bind your grid to a collection of PersonViewModel
.
精彩评论