Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muak/aiforms.layouts
AiForms.Layouts (WrapLayout) for Xamarin.Forms
https://github.com/muak/aiforms.layouts
repeatable-stacklayout wrap-layout wrap-panel xamarin xamarin-forms
Last synced: about 2 months ago
JSON representation
AiForms.Layouts (WrapLayout) for Xamarin.Forms
- Host: GitHub
- URL: https://github.com/muak/aiforms.layouts
- Owner: muak
- License: mit
- Created: 2017-02-10T12:38:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-25T09:39:41.000Z (over 4 years ago)
- Last Synced: 2024-10-04T13:18:33.080Z (3 months ago)
- Topics: repeatable-stacklayout, wrap-layout, wrap-panel, xamarin, xamarin-forms
- Language: C#
- Homepage:
- Size: 2.82 MB
- Stars: 94
- Watchers: 12
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# AiForms.Layouts for Xamarin.Forms
This is a collection of Xamarin.Forms custom layouts
## Referenced source code
* https://forums.xamarin.com/discussion/comment/57486/#Comment_57486
* https://forums.xamarin.com/discussion/21635/xforms-needs-an-itemscontrol/p2## Features
* [RepeatableFlex](#repeatableflex)
* [WrapLayout](#wraplayout)
* [RepeatableWrapLayout](#repeatablewraplayout)
* [RepeatableStack](#repeatablestack)## Demo
https://twitter.com/muak_x/status/830061279330996224
## Nuget Installation
[https://www.nuget.org/packages/AiForms.Layouts/](https://www.nuget.org/packages/AiForms.Layouts/)
```bash
Install-Package AiForms.Layouts
```You need to install this package to .NETStandard / PCL project and **each platform project**.
### iOS
If you don't use XamlCompilationOptions.Compile, need to write following code in AppDelegate.cs; Otherwise needn't.
```cs
public override bool FinishedLaunching(UIApplication app, NSDictionary options) {
global::Xamarin.Forms.Forms.Init();AiForms.Layouts.LayoutsInit.Init(); //need to write here
LoadApplication(new App(new iOSInitializer()));
return base.FinishedLaunching(app, options);
}
```## RepeatableFlex
This layout is a FlexLayout corresponding to DataTemplate and DataTemplateSelector.
### Parameters
* ItemsSource
* ItemTemplate### How to write with Xaml
```xml
```
## WrapLayout
This Layout performs wrapping on the boundaries.
_By Flex Layout having come, there is seldom opportunity using this layout. But it can be used when you want to arrange uniformly each items depending on screen width or make it square._
### 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
```xml
```
## RepeatableWrapLayout
This Layout is WrapLayout corresponding to DataTemplate and DataTemplateSelector.
> If a lot of items are arranged, you should use [CollectionView](https://github.com/muak/AiForms.CollectionView) that can recycle items.
### Parameters
* ItemTapCommandProperty
* Command invoked when a item is tapped.
* ItemsSource
* ItemTemplate### How to write with Xaml
```xml
```
## RepeatableStack
This layout is a StackLayout corresponding to DataTemplate and DataTemplateSelector.
### Parameters
* ItemsSource
* ItemTemplate### How to write with Xaml
```xml
```
## Contributors* [predalpha](https://github.com/predalpha)
## License
MIT Licensed.