Xamarin Forms Labs

Xamarin Forms Labs is a open source project that aims to provide a powerful and cross platform set of controls and helpers tailored to work with Xamarin Forms.


Project maintained by gabornemeth Hosted on GitHub Pages — Theme by mattgraham

Xamarin Forms Labs

Xamarin Forms Labs is a open source project that aims to provide a powerful and cross platform set of controls tailored to work with Xamarin Forms.

Call for action for all Xamarin Developers, embrace this project and share your controls and services with the community, add your own control to the toolkit.

NOTICE: This project is no longer officially maintained.

This is a private fork, which can be significantly differenct from the original one. It’s focusing on the controls only. Right now recent NuGet packages can be grabbed from MyGet.

Available controls

You can check the latest state of available controls here

Available services (Beta)

Available Mvvm helpers (Beta)

Available Plugins (Beta)


Getting started

Using the controls

Add Xamarin.Forms.Labs.Controls reference to your projects , main pcl, ios, android, and wp.

Xaml :

Reference the assembly namespace

 xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"

Render your control:

 <controls:ImageButton Text="Twitter" BackgroundColor="#01abdf" TextColor="#ffffff" HeightRequest="75" WidthRequest="175" Image="icon_twitter" Orientation="ImageToLeft"  ImageHeightRequest="50" ImageWidthRequest="50" />

Or from your codebehind:

var button = new ImageButton() {
			ImageHeightRequest = 50,
			ImageWidthRequest = 50,
			Orientation = Orientation.ImageToLeft,
			Source = "icon_twitter.png",
			Text = "Twitter"
		};
stacker.Children.Add (button);

Using the Services

TextToSpeechService

DependencyService.Get<ITextToSpeechService>().Speak(TextToSpeak);

Device

	var device = Resolver.Resolve<IDevice>();
	device.Display; //display information
	device.Battery; //battery information

PhoneService

 	var device = Resolver.Resolve<IDevice>();
	// not all devices have phone service, f.e. iPod and Android tablets
	// so we need to check if phone service is available
	if (device.PhoneService != null)
	{
		device.PhoneService.DialNumber("+1 (855) 926-2746");
	}

Initializing the Services

Do this before using the services

Step 1:

Step 2: Initialize the container in your app startup code.

	var container = new SimpleContainer ();
	container.Register<IDevice> (t => AppleDevice.CurrentDevice);
	container.Register<IDisplay> (t => t.Resolve<IDevice> ().Display);
	container.Register<INetwork>(t=> t.Resolve<IDevice>().Network);

	Resolver.SetResolver (container.GetResolver ());

For more info on initialization go to the Labs Wiki ______

Helper

Current version v1.2.0

v1.2.0 - Xamarin Forms Labs Framework Helper for online use

v1.2.0 - Xamarin.Forms.Labs.chm file for offline use

Based in last developments (master)

Master- Xamarin Forms Labs Framework Helper for online use

Master - Xamarin.Forms.Labs.chm file for offline use ______

Build the project

To develop on this project, just clone the project to your computer, package restore is enable so build the solution first, if you get any errors try to build each project independently .


Nuget

Main Packages:

Plugins:


Contributions:

Contribute

Everbody is welcome to contribute.

Twitter hashtag : #xflabs


License

License Apache 2.0 more about that in the LICENSE file.