I would like to display a grouped ListBox like this :
- Tag A
- Post 1
- Post 2
- Tag B
- Post 2
Source collection is a list of Post, each post can have many Tags.
If user selects “Post 2”, it get highlighted twice.
I tried using an ICollectionView, but it need a Single value to filter, not multivalued one.
Assuming that this is your structure…
The only way you can achieve tags based grouping is by flattening it out
This way you will have a flatten hierarchy of repeating
Postobjects with each of their Tags (i.e.Post.Tagsproperty will have only one individual Tag for thatPost).After this, the grouping will apply just fine.