I have a set of data that I'd like to present via a WPF ListView in this way:
Column1 Column2 Column3 --GroupName1-- Item1 part2 part3 Item2 part2 part3 --GroupName2-- Item3 part2 part3 Item4 long_text_in_both_columns Item5 part2 part3 --GroupName1-- Item6 part2 part3 Item7 long_text_in_both_columns --GroupName3-- Item8 part2 part3
I'd like to color the groups such that each group name has an associated color. Note that in the above list, there are two instances of "GroupName1", and both should be the same color. I am starting by working with this basic sample: http://msdn.microsoft.com/en-us/library/ms771309(VS.90).aspx
Specifically:
-How can I have two groups with the same name, but differing items? (Possibly something like a hidden "group ID" that differs from the displayed "group name"?)
-How can I style each group by name?
(Note that all of the items are always displayed in order, and options other than groups would be fine too.)