Each item that is added to the header or footer sections of a group configuration must be added as DataTemplates or GroupHeaderFooterItemTemplates, which must have a DataTemplate as an immediate child and whose VisibleWhenCollapsed property can be set to true (by default false) to keep the item visible when its containing group is collapsed. A group configuration's InitiallyExpanded property can also be set to provide an initial expansion state for all groups to which the configuration will be applied.
By default, group configurations contain a GroupHeaderControl in their header section that allow groups to be collapsed and expanded. In XAML, the content of a header or footer section can be cleared by setting the UseDefaultHeadersFooters property of a group configuration to false. If left to true, any items that are added to a header or footer section will be added after the default headers and footers.
Each template that is added to a header or footer section will create a container for itself in every individual group. A specific container can be identified through the use of a GroupHeaderFooterItem, which is created from the CollectionViewGroup in which the container is located and the template that was used to create it.