Edit

How to: Group Items in a ListView That Implements a GridView

This example shows how to display groups of items in the GridView view mode of a ListView control.

Example

To display groups of items in a ListView, define a CollectionViewSource. The following example shows a CollectionViewSource that groups data items according to the value of the Catalog data field.


  
    
  

The following example sets the ItemsSource for the ListView to the CollectionViewSource that the previous example defines. The example also defines a GroupStyle that implements an Expander control.


  
    
      
        
      
    
  

See also