⚠ Deprecated: Legacy
Suggested alternative: EleCho.WpfSuite
Flex layout for Windows Presentation Foundation
$ dotnet add package EleCho.WpfUtilities.FlexLayoutImplementation of Flex Layout in WPF
<Window
xmlns:flex="clr-namespace:EleCho.WpfUtilities.FlexLayout;assembly=EleCho.WpfUtilities.FlexLayout">
</Window>
FlexPanel to your xaml<flex:FlexPanel Direction="Row" MainAlignment="SpaceBetween" CrossAlignment="Start" ItemsAlignment="Start" Wrap="Wrap">
<Rectangle Fill="Pink" Width="200" Height="200"/>
<Rectangle Fill="Purple" Width="150" Height="150"/>
<Rectangle Fill="BlueViolet" Width="200" Height="200"/>
<Rectangle Fill="Fuchsia" Width="150" Height="150"/>
<Rectangle Fill="BlueViolet" Width="200" Height="200"/>
</flex:FlexPanel>