All Projects → muak → Aiforms.layouts

muak / Aiforms.layouts

Licence: mit
AiForms.Layouts (WrapLayout) for Xamarin.Forms

Projects that are alternatives of or similar to Aiforms.layouts

Xamarin.plugins
Cross-platform Native API Access from Shared Code!
Stars: ✭ 1,176 (+1151.06%)
Mutual labels:  xamarin, xamarin-forms
Xam.plugin.simplebottomdrawer
Just a nice and simple BottomDrawer for your Xamarin Forms project
Stars: ✭ 92 (-2.13%)
Mutual labels:  xamarin, xamarin-forms
Hunt
Hunt is a virtual scavenger hunt app where players can join a game, select a team and solve hints to acquire treasure. The team with the most points wins.
Stars: ✭ 65 (-30.85%)
Mutual labels:  xamarin, xamarin-forms
Mvvmnano
The small and smart MVVM framework made with ❤ for Xamarin.Forms.
Stars: ✭ 53 (-43.62%)
Mutual labels:  xamarin, xamarin-forms
Xamuidemo
Xamarin Forms Login Page UI Kit
Stars: ✭ 82 (-12.77%)
Mutual labels:  xamarin, xamarin-forms
Lottiexamarin
Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin
Stars: ✭ 1,085 (+1054.26%)
Mutual labels:  xamarin, xamarin-forms
Xxamarin
Repositório com ✨ 141 Exemplos de Implementações e 📦 13 Pacotes de Xamarin
Stars: ✭ 68 (-27.66%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Forms Walkthrough
Mobile App Walkthrough created with Xamarin.Forms
Stars: ✭ 46 (-51.06%)
Mutual labels:  xamarin, xamarin-forms
Barcodescanner.xf
Barcode Scanner using GoogleVision API for Xamarin Form
Stars: ✭ 82 (-12.77%)
Mutual labels:  xamarin, xamarin-forms
Bottomtabbedpage Xamarin Forms
A page control for Xamarin.Forms to place tabs at the bottom.
Stars: ✭ 90 (-4.26%)
Mutual labels:  xamarin, xamarin-forms
Aprende Xamarin
Aprende C# y Xamarin desde cero! Auto-guiado y a tu ritmo. Dale ⭐si te gusta. Documentación disponible en el Wiki (website)
Stars: ✭ 53 (-43.62%)
Mutual labels:  xamarin, xamarin-forms
Faceoff
An iOS, Android and UWP app created in Xamarin.Forms that uses Microsoft's Cognitive Emotion API Services to compare facial expressions
Stars: ✭ 79 (-15.96%)
Mutual labels:  xamarin, xamarin-forms
Xamarin
Presentations for building native mobile apps with .NET and Xamarin
Stars: ✭ 49 (-47.87%)
Mutual labels:  xamarin, xamarin-forms
Enhancedentry
Extended Xamarin Forms Entry with custom behaviours.
Stars: ✭ 64 (-31.91%)
Mutual labels:  xamarin, xamarin-forms
Facialrecognitionlogin
An iOS and Android app that uses facial recognition to enhance the security of a login page. Built using Xamarin.Forms and Microsoft Cognitive Services.
Stars: ✭ 46 (-51.06%)
Mutual labels:  xamarin, xamarin-forms
Googleanalyticsforxamarinforms
Google Analytics Plugin for Xamarin Forms
Stars: ✭ 65 (-30.85%)
Mutual labels:  xamarin, xamarin-forms
Azure For Developers Workshop
The Azure cloud is huge and the vast service catalog may appear daunting at first, but it doesn’t have to be!
Stars: ✭ 38 (-59.57%)
Mutual labels:  xamarin, xamarin-forms
Fabulous Simple Elements
An alternative view rendering API for Fabulous (Elmish Xamarin.Forms) that is easy to use and simple to read, inspired by Elmish on the web.
Stars: ✭ 43 (-54.26%)
Mutual labels:  xamarin, xamarin-forms
Reactivemvvm
Cross-platform ReactiveUI sample app built for a talk at MSK .NET conf.
Stars: ✭ 94 (+0%)
Mutual labels:  xamarin, xamarin-forms
Mytripcountdown
Xamarin.Forms goodlooking UI sample
Stars: ✭ 94 (+0%)
Mutual labels:  xamarin, xamarin-forms

AiForms.Layouts for Xamarin.Forms

This is a collection of Xamarin.Forms custom layouts

Referenced source code

Features

Demo

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

Nuget Installation

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

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.

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

<ScrollView Orientation="Virtical" HeightRequest="86">
<al:RepeatableFlex Direction="Row" Wrap="Wrap" AlignItems="Start" JustifyContent="Start" ItemsSource="{Binding BoxList}">
	<al:RepeatableFlex.ItemTemplate>
		<DataTemplate>
			<ContentView BackgroundColor="{Binding Color}" WidthRequest="80" HeightRequest="80" Padding="3" />
		</DataTemplate>
	</al:RepeatableFlex.ItemTemplate>
</al:RepeatableFlex>
</ScrollView>

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

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
		xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
		xmlns:l="clr-namespace:AiForms.Layouts;assembly=AiForms.Layouts"
		x:Class="Sample.Views.MainPage">
    <StackLayout>
        <l:WrapLayout Spacing="4" UniformColumns="3" IsSquare="true" HorizontalOptions="FillAndExpand">
    		<BoxView Color="Red" />
            <BoxView Color="Blue" />
            <BoxView Color="Green" />
            <BoxView Color="Black" />
            <BoxView Color="Yellow" />
        </l:WrapLayout>
    </StackLayout>
</ContentPage>

RepeatableWrapLayout

This Layout is WrapLayout corresponding to DataTemplate and DataTemplateSelector.

If a lot of items are arranged, you should use CollectionView that can recycle items.

Parameters

  • ItemTapCommandProperty
    • Command invoked when a item is tapped.
  • ItemsSource
  • ItemTemplate

How to write with Xaml

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
		xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
		xmlns:l="clr-namespace:AiForms.Layouts;assembly=AiForms.Layouts"
		x:Class="Sample.Views.MainPage">
	<StackLayout>
		<ScrollView HorizontalOptions="FillAndExpand">
			<l:RepeatableWrapLayout
				ItemTapCommand="{Binding TapCommand}"
				ItemsSource="{Binding BoxList}"
				Spacing="3" UniformColumns="{Binding UniformColumns}"
				IsSquare="{Binding IsSquare}" >
				<l:RepeatableWrapLayout.ItemTemplate>
					<DataTemplate>
						<StackLayout BackgroundColor="{Binding Color}" >
							<Label
								VerticalTextAlignment="Center" HorizontalTextAlignment="Center"
								Text="{Binding Name}"  />
						</StackLayout>
					</DataTemplate>
				</l:RepeatableWrapLayout.ItemTemplate>
			</l:RepeatableWrapLayout>
		</ScrollView>
	</StackLayout>
</ContentPage>

RepeatableStack

This layout is a StackLayout corresponding to DataTemplate and DataTemplateSelector.

Parameters

  • ItemsSource
  • ItemTemplate

How to write with Xaml

<!-- Horizontal -->
<ScrollView Orientation="Horizontal" HeightRequest="86">
<al:RepeatableStack Orientation="Horizontal" ItemsSource="{Binding BoxList}" HeightRequest="86">
	<al:RepeatableStack.ItemTemplate>
		<DataTemplate>
			<ContentView BackgroundColor="{Binding Color}" WidthRequest="80" HeightRequest="80" Padding="3" />
		</DataTemplate>
	</al:RepeatableStack.ItemTemplate>
</al:RepeatableStack>
</ScrollView>

<!-- Vertical -->
<ScrollView>
<al:RepeatableStack Orientation="Vertical" ItemsSource="{Binding BoxList}">
	<al:RepeatableStack.ItemTemplate>
		<DataTemplate>
			<ContentView BackgroundColor="{Binding Color}" WidthRequest="80" HeightRequest="80" Padding="3" />
		</DataTemplate>
	</al:RepeatableStack.ItemTemplate>
</al:RepeatableStack>
</ScrollView>

Contributors

License

MIT Licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].