Xamarin.Forms

Cross-Platform User Interfaces with Xamarin.Forms

Xamarin.Forms is a cross-platform UI toolkit that allows developers to easily create native user interface layouts that can be shared across Android, iOS, and Windows Phone. This section contains the introduction to Xamarin.Forms and our guides to help you build Xamarin.Forms apps. You can also learn more about its capabilities, try our samples, and browse the API documentation.

Creating Mobile Apps with Xamarin.Forms

The first edition of Charles Petzold's book Creating Mobile Apps with Xamarin.Forms is available as a free download to help you get started with Xamarin.Forms!

Xamarin.Forms for Windows

Check out Xamarin.Forms running on Windows! Add projects that run on Windows 8.1, Windows Phone 8.1, and the Universal Windows Platform to your existing Xamarin.Forms solutions.

Is Xamarin.Forms right for your project?

Xamarin provides two ways to build great, native apps. Xamarin.Forms maximizes code sharing, while Xamarin.iOS and Xamarin.Android provide direct access to platform-specific APIs.

Xamarin.Forms

Xamarin.Forms is best for:

  • Data entry apps
  • Prototypes and proofs-of-concept
  • Apps that require little platform-specific functionality
  • Apps where code sharing is more important than custom UI
Xamarin.Forms

Xamarin.iOS & Xamarin.Android are best for:

  • Apps that require specialized interactions
  • Apps with highly polished design
  • Apps that use many platform-specific APIs
  • Apps where custom UI is more important than code sharing

Either way, you'll get fully native apps with shared business logic using C# and the .NET framework.

Xamarin.Forms Developer Guides

The documents in this section show you how to build cross-platform apps using Xamarin.Forms.

Getting Started

This document introduces the basics of Xamarin.Forms development and covers creating and running your first application, and extending the application to include multiple screens.

Xamarin.Forms Controls Reference

This document is a quick reference to the UI views that make up the Xamarin.Forms framework, such as Pages, Layouts, Views and Cells.

User Interface

Working with Xamarin.Forms user interface controls like ListView, TableView, and WebView.

Templates

Control templates provide the ability to easily theme and re-theme application pages at runtime, while data templates provide the ability to define the presentation of data on supported controls.

Behaviors

User interface controls can be easily extended without subclassing by using behaviors to add functionality.

Platform Features

Taking advantage of platform-specific features with Xamarin.Forms, such as styling iOS applications and incorporating the latest iOS 9 features, and updating Android apps to use Material Design.

Working with...

Working with different aspects of the Xamarin.Forms APIs including images, fonts and files.

Effects

Effects allow the native controls on each platform to be customized, and are typically used for small styling changes.

Customizing Controls for Each Platform

Custom Renders let developers 'override' the default rendering of Xamarin.Forms controls to customize their appearance and behavior on each platform (using native SDKs if desired).

Accessing Native Features via the DependencyService

The DependencyService provides a simple locator so that you can code to Interfaces in your shared code and provide platform-specific implementations that are automatically resolved, making it easy to reference platform-specific functionality in Xamarin.Forms.

Publish and Subscribe with MessagingCenter

Xamarin.Forms MessagingCenter enables view models and other components to communicate with without having to know anything about each other besides a simple Message contract.

Web Services

Xamarin.Forms applications can consume web services implemented using a wide variety of technologies, and this guide will examine how to do this.

Advanced Topics

The built-in .NET localization framework can be used to build cross-platform multilingual applications with Xamarin.Forms.

Deployment, Testing, and Metrics

Stabilize your Xamarin.Forms app by improving its performance, and by writing UI tests to run in the cloud on hundreds of devices.

Troubleshooting

Common problems and how to resolve them.

Xamarin.Forms XAML Basics

XAML—the eXtensible Application Markup Language—allows developers to define user interfaces in Xamarin.Forms applications using markup rather than code. XAML is never required in a Xamarin.Forms program but it is often more succinct than equivalent code, more visually coherent, and potentially toolable. XAML is particularly well suited for use with the popular MVVM (Model-View-ViewModel) application architecture: XAML defines the View that is linked to ViewModel code through XAML-based data bindings.

API Documentation

Browse the API documentation for Xamarin.Forms.

Samples

Check out the sample gallery for Xamarin.Forms or clone directly from Github.