Introduction to Xamarin.Forms (XAM120)

Xamarin.Forms lets you define a single UI that you share across all your supported platforms. This maximizes your ability to share code: you can share your UI and your business logic. In this course, you will create a new Xamarin.Forms application and define your shared UI in code. You will also see how to access platform-specific features such as the phone dialer or camera that do not have a shared-programming model integrated into Xamarin.Forms.

Recommended prerequisite for this course

Upon completion you will be able to:

Course exercise download

Exercise materials are available from GitHub. The code can be cloned through a desktop Git client or downloaded directly as a ZIP file.

If you are using Windows, try to select a location with a shorter path length to make sure you don't exceed the 260 character limit.

Lecture

Here are the lecture slides.

Exercises

  1. Exercise 1: Creating your first Xamarin.Forms application

    The primary goal of this exercise is to create a new Xamarin.Forms application using the project templates in Visual Studio on macOS or Windows. We will then walk through the project and explore all the parts. Our secondary goal is to explore how to share code between platform-specific projects.

  2. Exercise 2: Creating Xamarin.Forms Phoneword

    The goal of this exercise is to create a new Xamarin.Forms application which displays a UI to translate an alphanumeric phone number to a numeric number and place a call. The UI will consist of a: Label, an Entry, and two Button controls.

  3. Exercise 3: Adding support for dialing the phone

    The goal of this exercise is to add platform-specific behavior into our Phoneword application to display an alert and let the user dial the phone.

Additional resources

Useful links

Xamarin.Forms - Write Once, Run Everywhere, AND be Native?

Samples

Xamarin.Forms officials samples