项目作者: bkardol

项目描述 :
A wrappanel supporting variable width/height items.
高级语言: C#
项目地址: git://github.com/bkardol/wrappanel.git
创建时间: 2019-06-03T23:21:17Z
项目社区:https://github.com/bkardol/wrappanel

开源协议:MIT License

下载


Welcome to the WrapPanel repository!

NuGet Downloads

Info

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:

  • WrapPanel, containing the source of the WrapPanel itself;
  • WrapPanel.Example, containing an example application demonstrating the use of the WrapPanel.

Quick-Start

In your xaml page add the following namespace:

  1. xmlns:wp="using:WrapPanel"

After, you can start using the WrapPanel:

  1. <wp:WrapPanel ItemsSource="{x:Bind Blocks, Mode=OneWay}">
  2. <wp:WrapPanel.ItemTemplate>
  3. <DataTemplate x:DataType="local:Block">
  4. <Border Background="Black" Width="100" Height="100" Margin="10" ></Border>
  5. </DataTemplate>
  6. </wp:WrapPanel.ItemTemplate>
  7. </wp:WrapPanel>

Below, a screenshot of the WrapPanel in action where all children are sorted by size.

wrappanel example