I am trying to mimic the msn messenger contactlist treeview display.
I have a Contact object which has a Groups property that returns an array msngroups that the Contact belongs, this meaning say I have something as per bellow
Class Contact
{
string Name;
string[] Groups {get;set;}
}
ObservableCollection<Contact> ContactList;
So a contact can be in mutiple groups, is that possible to use CollectionViewSource to generate the correct view to feed a wpf TreeView?
The grouping would work when you flatten this hierarchy i.e. “Contact having Groups” into “Repeated Contacts having each single group” …
e.g.
If you have 4 items with groups like …
Then you new flat list should be like this…
So after applyin grouping on the
Keysabove it should beC# Code:
XAML
Let me know if this helps…