From the course: Introduction to Xamarin.Forms
Unlock this course with a free trial
Join today to access over 22,400 courses taught by industry experts.
Implementing cross-platform abstractions - Xamarin Tutorial
From the course: Introduction to Xamarin.Forms
Implementing cross-platform abstractions
- [Instructor] Xamarin Forms has some really useful API's but it doesn't expose everything from the platform. In fact, it is very likely there will be some feature you need to use which is not available to your shared code. For these cases we have to put a little architecture thought into our application. We will want to use the APIs available in the platform specific project but somehow invoke them from our shared code. For example, consider dialing the phone. All three platForms have support for this feature but each one accomplishes it slightly differently and to fully control it we would want to write that code uniquely per platform. Let's take a look at what Xamarin Forms has to offer for situations such as this. First you'll want to create some form of abstraction. That might be an interface or a base class, but something to represent the feature you want to use in your shared code. Best Practice dictates that we build an abstraction implemented by the target platform which…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What is Xamarin.Forms?6m 26s
-
Create an app in Xamarin Studio4m 54s
-
Create an app in Visual Studio2m 58s
-
Exercise 1: Creating your first Xamarin.Forms app4m 54s
-
Application and pages3m 10s
-
Pages and views4m 2s
-
Layout in Xamarin.Forms5m 7s
-
Exercise 2: Create the Phoneword application10m 29s
-
Using platform-specific code4m 12s
-
Implementing cross-platform abstractions4m 35s
-
Exercise 3: Adding support for dialing the phone8m 39s
-