title: How to insert multiple GroupDescription?
body: <p>I've made an application that allow to get the live result of a match. 
  Now the organization of each match is this:</p>
  
  <pre><code>Nation-&gt;League-&gt;Match list
  </code></pre>
  
  <p>So I've the <code>Nation</code> that is the container of the <code>League</code>, and the <code>League</code> is the container of the <code>Match</code>. What I did firstly was create a <code>XAML</code> structure that allow me to achieve a container result as said before:</p>
  
  <pre><code>&lt;Window x:Class="GroupBox_Header.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:local="clr-namespace:GroupBox_Header"
      mc:Ignorable="d"
      Title="MainWindow" Height="350" Width="525"&gt;
  &lt;Grid Margin="10"&gt;
      &lt;ListView Name="lvUsers"&gt;
          &lt;ListView.View&gt;
              &lt;GridView&gt;
                  &lt;GridViewColumn Header="Home Team" Width="50" DisplayMemberBinding="{Binding HomeTeam}" /&gt;
                  &lt;GridViewColumn Header="Away Team" Width="50" DisplayMemberBinding="{Binding AwayTeam}" /&gt;
              &lt;/GridView&gt;
          &lt;/ListView.View&gt;
  
          &lt;ListView.GroupStyle&gt;
              &lt;GroupStyle&gt;
                  &lt;GroupStyle.ContainerStyle&gt;
                      &lt;Style TargetType="{x:Type GroupItem}"&gt;
                          &lt;Setter Property="Template"&gt;
                              &lt;Setter.Value&gt;
                                  &lt;ControlTemplate&gt;
                                      &lt;Expander IsExpanded="True"&gt;
                                          &lt;Expander.Header&gt;
                                              &lt;StackPanel Orientation="Horizontal"&gt;
                                                  &lt;TextBlock Text="{Binding Name}" FontWeight="Bold" Foreground="Gray" FontSize="22" VerticalAlignment="Bottom" /&gt;
                                                  &lt;TextBlock Text="{Binding ItemCount}" FontSize="22" Foreground="Green" FontWeight="Bold" FontStyle="Italic" Margin="10,0,0,0" VerticalAlignment="Bottom" /&gt;
                                                  &lt;TextBlock Text=" Items" FontSize="22" Foreground="Silver" FontStyle="Italic" VerticalAlignment="Bottom" /&gt;
                                              &lt;/StackPanel&gt;
                                          &lt;/Expander.Header&gt;
                                          &lt;ItemsPresenter /&gt;
                                      &lt;/Expander&gt;
                                  &lt;/ControlTemplate&gt;
                              &lt;/Setter.Value&gt;
                          &lt;/Setter&gt;
                      &lt;/Style&gt;
                  &lt;/GroupStyle.ContainerStyle&gt;
              &lt;/GroupStyle&gt;
              &lt;GroupStyle&gt;
                  &lt;GroupStyle.ContainerStyle&gt;
                      &lt;Style TargetType="{x:Type GroupItem}"&gt;
                          &lt;Setter Property="Template"&gt;
                              &lt;Setter.Value&gt;
                                  &lt;ControlTemplate&gt;
                                      &lt;Expander IsExpanded="True"&gt;
                                          &lt;Expander.Header&gt;
                                              &lt;StackPanel Orientation="Horizontal"&gt;
                                                  &lt;TextBlock Text="{Binding League}" FontWeight="Bold" Foreground="Gray" FontSize="22" VerticalAlignment="Bottom" /&gt;
                                              &lt;/StackPanel&gt;
                                          &lt;/Expander.Header&gt;
                                          &lt;ItemsPresenter /&gt;
                                      &lt;/Expander&gt;
                                  &lt;/ControlTemplate&gt;
                              &lt;/Setter.Value&gt;
                          &lt;/Setter&gt;
                      &lt;/Style&gt;
                  &lt;/GroupStyle.ContainerStyle&gt;
              &lt;/GroupStyle&gt;
          &lt;/ListView.GroupStyle&gt;
      &lt;/ListView&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>How you can see there is a <code>ListView</code> that have a <code>GroupStyle</code> definition, in this I save all the <code>Nation</code>. You can try the <code>XAML</code> in your demo solution and check the result.</p>
  
  <p>After this, I've created the struct that allow me to store the value:</p>
  
  <pre><code>public struct League 
  {
      public string Name { get; set; }
  }
  
  public struct Country
  {
      public string Name   { get; set; }
      public League League;
  }
  </code></pre>
  
  <p>Is very pretty simple, a <code>League</code> struct for save all the leagues and a <code>Country</code> struct for the nations. I've valorized the <code>Country</code> in this way:</p>
  
  <pre><code>List&lt;Country&gt; items = new List&lt;Country&gt;();
              items.Add(new Country() { Name = "Italy", League = { Name = "Serie A"} });
              items.Add(new Country() { Name = "Italy", League = { Name = "Serie B" } });
              items.Add(new Country() { Name = "England", League = { Name = "Premiere League" } });
              items.Add(new Country() { Name = "Spain", League = { Name = "Primeira Division" } });
              lvUsers.ItemsSource = items; 
  </code></pre>
  
  <p>So I actually have in list <code>Italy (2), England, Spain</code>. I then inserted <code>items</code> in the <code>ItemsSource</code> of the <code>ListView</code> (the XAML control).</p>
  
  <p>For create the header group as the <code>Nation</code> name, I've used a <code>CollectionView</code>:</p>
  
  <pre><code>CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(lvUsers.ItemsSource);
          PropertyGroupDescription groupNations = new PropertyGroupDescription("Name");
  </code></pre>
  
  <p>This code allow me to create multiple headers, and the result is exactly what I want. I also did the same for the <code>League</code>, 'cause what I need is insert as a <code>sub-header</code> the <code>League</code> name in <code>Nation</code> container (header):</p>
  
  <pre><code>        view.GroupDescriptions.Add(groupNations);
          PropertyGroupDescription groupCompetions = new PropertyGroupDescription("League");
          view.GroupDescriptions.Add(groupNations);
  </code></pre>
  
  <p>but actually this is the result:</p>
  
  <p><a href="https://i.stack.imgur.com/GPYsI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GPYsI.png" alt="enter image description here"></a></p>
  
  <p>How you can see only the nation header appear, but the <code>League</code> header doesn't appear inside the <code>Nation</code> header. What am I doing wrong?</p>