How do I group items in a WPF ListView

后端 未结 2 2054
挽巷
挽巷 2020-11-30 06:42

I have a ListView that I want to group results into, however the examples I am finding are not working. How can I group my results?

I want to group on t

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-30 07:02

    I notice one thing right away - the GroupStyle.HeaderTemplate will be applied to a CollectionViewGroup, so your DataTemplate should probably look like this:

    
        
            
                
            
        
    
    

    CollectionViewGroup.Name will be assigned the value of Status for that group.

提交回复
热议问题