Skip to content

MikD1/AvaloniaFixedWrapPanel

Repository files navigation

Avalonia Fixed WrapPanel

Avalonia WrapPanel with fixed number of items per line

How to use

  1. Add NuGet package
MikD1.AvaloniaFixedWrapPanel
  1. Add namesace to XAML file
xmlns:afwp="clr-namespace:AvaloniaFixedWrapPanel;assembly=AvaloniaFixedWrapPanel"
  1. Use FixedWrapPanel
<ItemsControl Items="{Binding Items}">
    <ItemsControl.ItemsPanel>
        <ItemsPanelTemplate>
            <afwp:FixedWrapPanel ItemsPerLine="5" />
        </ItemsPanelTemplate>
    </ItemsControl.ItemsPanel>
    <ItemsControl.ItemTemplate>
        <DataTemplate>
            <Border>
                <TextBlock Text="Some text"/>
            </Border>
        </DataTemplate>
    </ItemsControl.ItemTemplate>
</ItemsControl>

About

Avalonia WrapPanel with fixed number of items per line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages