Skip to content

muak/AiForms.Maui.Layouts

Repository files navigation

AiForms.Layouts for NET MAUI

This is a collection of NET MAUI custom layouts

Referenced source code

Features

Demo

https://twitter.com/muak_x/status/830061279330996224

Nuget Installation

https://www.nuget.org/packages/AiForms.Maui.Layouts/

Install-Package AiForms.Maui.Layouts

WrapLayout

This Layout performs wrapping on the boundaries.

Parameters

  • 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)

How to write with Xaml

<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>

License

MIT Licensed.

About

AiForms.Layouts for .NET MAUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages