1
我如何在ListCollectionView中進行雙重分組(通過雙重分組,我的意思是不僅僅是由兩個屬性分組,而是根據另一個屬性分組的內容)?ListCollectionView分組已分組項目
例如:
class Person{
public string Name;
public int Age;
{
List<Person> list = new List<Person>{
new Person{ Name = Alex, Age = 22 },
new Person{ Name = Alex, Age = 23 },
new Person{ Name = Sam, Age = 19 },
new Person{ Name = Sam, Age = 33 }
};
ListCollectionView listView = new ListCollectionView(list);
listView.GroupDescriptions.add(new PropertyGroupDescription("Name"));
that is all i have right now, is there some way?
亞歷:
22:
亞歷22;
23:
亞歷23;
山姆:
19:
薩姆19;
33:
薩姆33;
在此先感謝您的幫助!
可以在分組後使用ListCollectionView中的結果嗎?因爲我需要將它綁定到ListBox – kotki