33
Portable Class Libraries Pierce Boggan @pierceboggan Developer Evangelist (Intern), Xamarin pierceboggan.com

Introduction to Xamarin.Forms

Embed Size (px)

DESCRIPTION

With Xamarin, you could already build amazing cross-platform native mobile apps for iOS, Android, and Mac using all of the power of C# and the .NET platform. Developers share 50-75% of their business logic (such as networking, database access, MVVM Models/ViewModels) across all platforms. On each platform, they build a native UI that is 100% native. Xamarin.Forms makes this even better. Xamarin.Forms allows you to build 3 native UIs using one shared C# codebase (or XAML if you prefer)! This means can share up to 100% of your code across iOS, Android, and Windows Phone. In this talk, I dive into an introduction of Xamarin.Forms, show off the firepower of the platform, and even talk about how you can implement platform-specific features with Xamarin.Forms.

Citation preview

Page 1: Introduction to Xamarin.Forms

Portable Class Libraries

Pierce Boggan @piercebogganDeveloper Evangelist (Intern), Xamarin pierceboggan.com

Page 2: Introduction to Xamarin.Forms

Xamarin + Xamarin.FormsXamarin.Forms

Code Sharing + 100% Native ControlsTraditional Xamarin Approach

Shared UI Code

Page 3: Introduction to Xamarin.Forms

Xamarin.Forms

Shared UI Code

Quickly and easy build native user interfaces from a single, shared C# codebase

Xamarin.Forms elements map directly to native controls and behaviors

Mix-and-match Xamarin.Forms with platform-specific APIs

Page 4: Introduction to Xamarin.Forms

What’s in the box?

• 40+ Layouts, Pages, and Controls• Build UIs in C# or XAML• Data Binding• Navigation• Animation API• Dependency Service• Custom Renderers• Messaging Center• So much more!

Page 5: Introduction to Xamarin.Forms

Pages

Content MasterDetail Navigation Tabbed Carousel

Page 6: Introduction to Xamarin.Forms

Layouts

Stack Absolute Relative Grid ContentView ScrollView Frame

Page 7: Introduction to Xamarin.Forms

Controls

ActivityIndicator

BoxView Button DatePicker Editor

Entry Image Label ListView Map

OpenGLView Picker ProgressBar SearchBar Slider

Stepper TableView TimePicker WebView EntryCell

ImageCell SwitchCell TextCell ViewCell

Page 8: Introduction to Xamarin.Forms

Controls

Page 9: Introduction to Xamarin.Forms

DEMO

Page 10: Introduction to Xamarin.Forms

Model-View-ViewModel

ModelView ViewModel

How to display information

What to displayFlow of interaction

Business LogicData objects

Events

Data Dat

a

Page 11: Introduction to Xamarin.Forms

Model-View-ViewModel

ModelView ViewModel

Xamarin.Forms Data Binding

Events

Data

Page 12: Introduction to Xamarin.Forms

Data Binding (Step 1)

Page 13: Introduction to Xamarin.Forms

Data Binding (Step 2)

Page 14: Introduction to Xamarin.Forms

Data Binding (Step 3)

Page 15: Introduction to Xamarin.Forms

Commands

• Execute a method when an action is performed, such as button click

• Parameter passing to commands

• Helps to increase code-sharing even more

Page 16: Introduction to Xamarin.Forms

Commands (Step 1)

Page 17: Introduction to Xamarin.Forms

Commands (Step 2)

Page 18: Introduction to Xamarin.Forms

DEMO

Page 19: Introduction to Xamarin.Forms

iOS APIs | 100% Coverage

Page 20: Introduction to Xamarin.Forms

Android APIs | 100% Coverage

Page 21: Introduction to Xamarin.Forms

Anything you can do in Objective-C, Swift, or Java

can be done in C# with Xamarin.

Page 22: Introduction to Xamarin.Forms

Dependency Service

• Full access to platform-specific APIs

• Access platform-specific implementations cleanly with Xamarin.Forms DependencyService

Page 23: Introduction to Xamarin.Forms

Dependency Service

Page 24: Introduction to Xamarin.Forms

Dependency Service

Page 25: Introduction to Xamarin.Forms

Dependency Service

Page 26: Introduction to Xamarin.Forms

DEMO

Page 27: Introduction to Xamarin.Forms

Wait… there’s more?

• Animation API

• Messaging Center

• Custom Controls

• Gesture Recognizers

• Xamarin.Forms.Maps

Page 28: Introduction to Xamarin.Forms

REAL-WORLD?

Page 29: Introduction to Xamarin.Forms

Resources

• API Documentation (http://developer.xamarin.com/guides/cross-platform/xamarin-forms/)

• Samples (https://github.com/xamarin/xamarin-forms-samples)

• Hanselman.Forms (https://github.com/jamesmontemagno/Hanselman.Forms)

• Xamarin.Forms Labs (https://github.com/XForms/Xamarin-Forms-Labs)

• Session Code (http://bit.ly/xamarin-forms-intro)

Page 30: Introduction to Xamarin.Forms

GET YOUR C# or F# SHIRT TODAY!

Page 31: Introduction to Xamarin.Forms

Learn more

Unrivaled Mobile Development TrainingLive unlimited mobile development training from mobile

experts, in your time-zone, on your schedule and as often as you'd

like

Page 32: Introduction to Xamarin.Forms

Key Attendees

Page 33: Introduction to Xamarin.Forms

Get Started Today: xamarin.com/download