title: WrapPanel inside ListBox in UWP
body: <p>I am looking to add <code>WrapPanel</code> inside my <code>ListBox</code> so that it's item wrap both vertically and horizentally. I was able to achieve this in Windows Phone 8 Sliverlight with Microsoft toolkit with below code;</p>
  
  <p>Windows Phone 8</p>
  
  <pre><code>&lt;ListBox x:Name="ListSection" ItemsSource="{Binding Section}" &gt; 
      &lt;ListBox.ItemsPanel&gt;
         &lt;ItemsPanelTemplate&gt;
            &lt;toolkit:WrapPanel Orientation="Horizontal" &gt;&lt;/toolkit:WrapPanel&gt;
         &lt;/ItemsPanelTemplate&gt;
      &lt;/ListBox.ItemsPanel&gt;
  &lt;ListBox.ItemTemplate&gt;
   &lt;DataTemplate&gt;
    &lt;StackPanel Margin="20"&gt;
     &lt;Image Source="{Binding ImagePath}" Width="80" Height="80"&gt;&lt;/Image&gt;
     &lt;TextBlock Style="{StaticResource PhoneTextBlockBase}"
                  HorizontalAlignment="Center"
                  Foreground="Black"
                  Text="{Binding Header}"
                  FontWeight="Bold"
                  VerticalAlignment="Center" /&gt;
   &lt;/StackPanel&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>
    </p>
  
  <p>I understand that Microsoft toolkit it not available in UWP, is there any possibility I could achieve such behavior in UWP?</p>
  
  <p>UWP not working</p>
  
  <pre><code>    &lt;ListBox x:Name="ItemsListBox" ItemsSource="{Binding Section}"&gt;
        &lt;ListBox.ItemsPanel&gt;
        &lt;ItemsPanelTemplate&gt;
           &lt;StackPanel HorizontalAlignment="Stretch"&gt;&lt;/StackPanel&gt;
        &lt;/ItemsPanelTemplate&gt;
        &lt;/ListBox.ItemsPanel&gt;
        &lt;ListBox.ItemTemplate&gt;
        &lt;DataTemplate&gt;
         &lt;StackPanel&gt;
            &lt;Image Source="{Binding ImagePath}" Width="80" Height="80"&gt;&lt;/Image&gt;
            &lt;TextBlock  HorizontalAlignment="Center"
                        Foreground="Black"
                        Text="{Binding Header}"
                        FontWeight="Bold"
                        VerticalAlignment="Center" /&gt;
         &lt;/StackPanel&gt;
         &lt;/DataTemplate&gt;
     &lt;/ListBox.ItemTemplate&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>Thanks! </p>