HierarchicalDataTemplate Distinct leaves
Posted
by miguel
on Stack Overflow
See other posts from Stack Overflow
or by miguel
Published on 2010-04-12T21:04:15Z
Indexed on
2010/04/12
21:12 UTC
Read the original article
Hit count: 291
I have a set of data that is structured like this:
ItemA.GroupA
ItemB.GroupA
ItemC.GroupB
ItemD.GroupC
I need to present the data in a WPF Tree View like this:
GroupA
--- ItemA
--- ItemB
GroupB
--- ItemC
GroupC
--- ItemD
What XAML can I use to group the leaves by distinct value? For instance, there could be multple items in the collection which are GroupA.ItemA, however, I only want to present the node and leaf once.
© Stack Overflow or respective owner