title: Multi height cell in a GridView - XAML
body: <p>I've made a dynamic GridView that take some information from a DataBase.</p>
  
  <p>Every GridViewCell is made of a another Grid so every Cell has a different number of row inside...</p>
  
  <p>My problem is that if I have a cell with lots of rows the table looks weird...</p>
  
  <p>Here's how I'd like to create my GridView:</p>
  
  <pre><code>┌─────┬────┬────┐
  │     │    │    │
  │     ├────┤    │
  ├─────┤    │    │
  │     │    ├────┤
  │     ├────┤    │
  └─────┴────┴────┘
  </code></pre>
  
  <p>I hope that anyone can help me :D</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here's my code:</p>
  
  <p>The Grid:</p>
  
  <pre><code>&lt;Grid&gt;
     &lt;GridView
           x:Name="listaSpecifiche" SelectionMode="None"
           IsSwipeEnabled="false" Height="Auto"
           IsItemClickEnabled="False" ItemsSource="{Binding Source={StaticResource sorgenteListaSpecifiche}}"
           IsHitTestVisible="False" ItemTemplate="{StaticResource specificaTemplate}"&gt;
        &lt;GridView.ItemsPanel&gt;
           &lt;ItemsPanelTemplate&gt;
               &lt;WrapGrid Orientation="Vertical"/&gt;
           &lt;/ItemsPanelTemplate&gt;
        &lt;/GridView.ItemsPanel&gt;
        &lt;GridView.GroupStyle&gt;
            &lt;GroupStyle HeaderTemplate="{StaticResource gruppoSpecificaTemplate}"&gt;
                 &lt;GroupStyle.Panel&gt;
                     &lt;ItemsPanelTemplate&gt;
                         &lt;VariableSizedWrapGrid Orientation="Vertical" Margin="0,0,20,0" Visibility="Visible"/&gt;
                     &lt;/ItemsPanelTemplate&gt;
                  &lt;/GroupStyle.Panel&gt;
             &lt;/GroupStyle&gt;
         &lt;/GridView.GroupStyle&gt;
         &lt;GridView.ItemContainerStyle&gt;
             &lt;Style TargetType="GridViewItem"&gt;
                  &lt;Setter Property="Margin" Value="0,-9,0,0" /&gt;
                  &lt;Setter Property="BorderBrush" Value="Blue" /&gt;
                  &lt;Setter Property="BorderThickness" Value="1" /&gt;
             &lt;/Style&gt;
         &lt;/GridView.ItemContainerStyle&gt;
    &lt;/GridView&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>DataTemplate:</p>
  
  <pre><code>&lt;DataTemplate x:Key="specificaTemplate"&gt;
       &lt;Grid Margin="0"&gt;
           &lt;Grid.RowDefinitions&gt;
               &lt;RowDefinition Height="25"/&gt;
           &lt;/Grid.RowDefinitions&gt;
          &lt;Grid.ColumnDefinitions&gt;
               &lt;ColumnDefinition Width="300" /&gt;
               &lt;ColumnDefinition Width="350" /&gt;
           &lt;/Grid.ColumnDefinitions&gt;
          &lt;TextBlock Margin="7,0,0,0" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="14" Text="{Binding Descrizione}"/&gt;
          &lt;TextBlock Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="14" Text="{Binding Valore}"/&gt;
       &lt;/Grid&gt;
  &lt;/DataTemplate&gt;
  
   &lt;DataTemplate x:Key="gruppoSpecificaTemplate"&gt;
       &lt;Grid Margin="5,0,0,5"&gt;
           &lt;Grid.RowDefinitions&gt;
               &lt;RowDefinition Height="50"/&gt;
           &lt;/Grid.RowDefinitions&gt;
           &lt;Grid.ColumnDefinitions&gt;
               &lt;ColumnDefinition Width="650"/&gt;
           &lt;/Grid.ColumnDefinitions&gt;
           &lt;StackPanel Background="#BB000795" Height="30" Grid.Row="0"&gt;
               &lt;TextBlock Text="{Binding Key}" Style="{StaticResource GroupHeaderTextStyle}" HorizontalAlignment="Left" 
                         VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Foreground="White" Margin="7,-10,0,0" /&gt;
           &lt;/StackPanel&gt;
  
       &lt;/Grid&gt;
   &lt;/DataTemplate&gt;
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've tryed to change the creation of the group of GridView, now I'm not using a grouped GridView and it's just a ListView of GridView, the problem persist, I think it's because the</p>
  
  <pre><code> &lt;WrapGrid Orientation='Vertical' /&gt;
  </code></pre>
  
  <p>I've tryed to use a <em>StackPanel</em> or a <em>VirtualisingStackPanel</em> and now there's only one column (so lots of Grids now are over the margin).</p>
  
  <p>Is there a way to create 1 ore more column when there's some overflow in a <em>StackPanel</em> ?</p>