This is a collection of NET MAUI custom layouts
- https://forums.xamarin.com/discussion/comment/57486/#Comment_57486
- https://forums.xamarin.com/discussion/21635/xforms-needs-an-itemscontrol/p2
- https://github.com/hartez/CustomLayoutExamples
https://twitter.com/muak_x/status/830061279330996224
https://www.nuget.org/packages/AiForms.Maui.Layouts/
Install-Package AiForms.Maui.Layouts
This Layout performs wrapping on the boundaries.
- Spacing
- added between elements
- UniformColumns
- number for uniform child width (default 0)
- If it is 0,it will obey WidthRequest value.
- If it is more than 0 ,a child width will be width which divide parent width by this number.
- IsSquare
- If it is true,it make item height equal to item width when UniformColums > 0 (default false)
<ContentPage
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:l="clr-namespace:AiForms.Maui.Layouts;assembly=AiForms.Maui.Layouts"
x:Class="Sample.Views.MainPage">
<l:WrapLayout Spacing="4" UniformColumns="3" IsSquare="true">
<BoxView Color="Red" />
<BoxView Color="Blue" />
<BoxView Color="Green" />
<BoxView Color="Black" />
<BoxView Color="Yellow" />
</l:WrapLayout>
</ContentPage>
MIT Licensed.