A wrappanel supporting variable width/height items.
Welcome to the WrapPanel repository!
As the VariableSizedWrapGrid and ItemsWrapGrid both take either user defined sizes or take the size of the first child it isn’t easy to display a collection of items with various sizes.
The WrapPanel control is created to support these circumstances.
The repository contains two directories:
In your xaml page add the following namespace:
xmlns:wp="using:WrapPanel"
After, you can start using the WrapPanel:
<wp:WrapPanel ItemsSource="{x:Bind Blocks, Mode=OneWay}">
<wp:WrapPanel.ItemTemplate>
<DataTemplate x:DataType="local:Block">
<Border Background="Black" Width="100" Height="100" Margin="10" ></Border>
</DataTemplate>
</wp:WrapPanel.ItemTemplate>
</wp:WrapPanel>
Below, a screenshot of the WrapPanel in action where all children are sorted by size.