windows8.1 store app project-
I have a ListView which is bound to an ObservableCollection of items in the ViewModel. I add an item to said Collection, and execute a sort method which places the added item at the beginning of the list. The Collection updates, but the ListView places the item in the end (right most end basically).
Since the app's requirement is to show the items from left to right (in order of date), I'm in a bind :/
How do I fix this?
答案 0 :(得分:3)
使用collection.Insert(0, item);
在集合的开头插入一个项目。