SlideShare a Scribd company logo
1 of 35
Download to read offline
Say Hello To Xamarin.Forms
Nish Anil
@nishanil | nish@xamarin.com
Traditional Xamarin Development
Using the Native UI SDKs
■
Build native UIs
■
UIKit & Storyboards on iOS
■
AXML for Android
■
XAML for Windows Phone
■
Write shared C# code
■
Database, Web Services
■
Business Logic
■
Share 60-80% of the code
UIKit Layout XAML
Using Xamarin.Forms
Shared UI Code!
To Build the User Interface
■
Use the same strategies for sharing
■
Database, Web Services
■
Business Logic
■
Build the UI with a single shared
codebase
■
Share 99% of the code
UIKit Layout XAML
Using Xamarin.Forms
Shared UI Code!
■
Code sharing/re-use
■
Native look and feel
■
Access to native SDKs using Custom
Renderers and DependencyService
■
Camera, accelerometer, GPS,
■
NFC & more on Android
■
PassKit & more on iOS
■
Tiles & more on Windows Phone
Benefits UIKit Layout XAML
Shared C# User Interface Code
Meet Xamarin.Forms
Build native UIs for iOS, Android and Windows Phone
from a single, shared C# codebase.
Meet Xamarin.Forms
Build native UIs for iOS, Android and Windows Phone
from a single, shared C# codebase.
Meet Xamarin.Forms
Build native UIs for iOS, Android and Windows Phone
from a single, shared C# codebase.
Meet Xamarin.Forms
Build native UIs for iOS, Android and Windows Phone
from a single, shared C# codebase.
Meet Xamarin.Forms
Build native UIs for iOS, Android and Windows Phone
from a single, shared C# codebase.
Meet Xamarin.Forms
Build native UIs for iOS, Android and Windows Phone
from a single, shared C# codebase.
Meet Xamarin.Forms
public class HelloWorld : ContentPage

{

public HelloWorld ()

{

var button = new Button
{ Text = "Say Hello" } ;

button.Clicked += SayHelloClicked;

Content = new StackLayout {

new Label { Text = "Hello World" } ,

button

};

}
void SayHelloClicked (object s, EventArgs e)

{

// do something

}

}

<?xml version="1.0" encoding="UTF-8"?>

<ContentPage xmlns="http://xamarin.com/schemas/2014/fo
x:Class="HelloForms.HelloWorld">

<StackLayout>

<Label Text="Hello World" />

<Button Text="Say Hello"
OnClick="SayHelloClicked" />

</StackLayout>

</ContentPage>



public partial class HelloWorld : ContentPage
{

public HelloWorld ()
{

InitializeComponent ();

}

void SayHelloClicked (object s, EventArgs e)
{

// do something

}

}
C# XAML
Demo
■
File > New Project
■
Create a screen
■
Add some code
■
Run on iOS, Android, 

& Windows Phone
How Xamarin.Forms works
Anatomy of a Xamarin.Forms Solution
■
PCL or Shared Project
How Xamarin.Forms works
Anatomy of a Xamarin.Forms Solution
■
PCL or Shared Project
■
NuGet Package
How Xamarin.Forms works
Anatomy of a Xamarin.Forms Solution
■
PCL or Shared Project
■
NuGet Package
■
App Class
How Xamarin.Forms works
Anatomy of a Xamarin.Forms Solution
■
PCL or Shared Project
■
NuGet Package
■
App Class
■
Android app
How Xamarin.Forms works
Anatomy of a Xamarin.Forms Solution
■
PCL or Shared Project
■
NuGet Package
■
App Class
■
Android app
■
iOS app
How Xamarin.Forms works
Anatomy of a Xamarin.Forms Solution
■
PCL or Shared Project
■
NuGet Package
■
App Class
■
Android app
■
iOS app
■
Windows Phone app
Platform Renderers
Taking Xamarin.Forms UI to the people (devices)
?
?
?
Platform Renderers
Taking Xamarin.Forms UI to the people
Platform Renderers
Taking Xamarin.Forms UI to the people
Platform Renderers
Taking Xamarin.Forms UI to the people
Xamarin.Forms brings common UX to everyone
iOS does not have a native control
for the iPhone, however
Xamarin.Forms uses
UISplitViewController on iPad.
Android has a native 'drawer'
control which Xamarin.Forms uses.
Windows Phone doesn’t have a
comparable UI metaphor, so
Xamarin.Forms provides an
implementation.
MasterDetailPage
Xamarin.Forms brings common UX to everyone
iOS has the UINavigationController
which Xamarin.Forms leverages.
Android has the navigation stack
built in, but Xamarin.Forms adds
the automatic 'back' button for API
consistency.
Windows Phone also has a back-
stack with hardware button, so
Xamarin.Forms takes advantage of
that.
NavigationPage
140+ new Controls!
http://components.xamarin.com
From our Partners!
Demo
■
Write Platform Specific Code
Dependency Service
Easily call into platform-specific code
■
In the common code
■
Code to an Interface
public interface ITextToSpeech

{

void Speak (string text);

}
Dependency Service
Easily call into platform-specific code
■
In the common code
■
Code to an Interface
■
Use DependencyService
public interface ITextToSpeech

{

void Speak (string text);

}
DependencyService.Get<ITextToSpeech>().Speak("Hello from Xamarin Forms");

Dependency Service
Easily call into platform-specific code
■
In the common code
■
Code to an Interface
■
Use DependencyService
■
For each platform
■
implement the Interface
[assembly: Xamarin.Forms.Dependency (typeof (Speech))]


public class Speech : ITextToSpeech

{

public Speech () { }

public void Speak (string text)

{

var speechSynthesizer = new AVSpeechSynthesizer ();

var speechUtterance = new AVSpeechUtterance (text) {

Rate = AVSpeechUtterance.MaximumSpeechRate/4,

Voice = AVSpeechSynthesisVoice.FromLanguage ("en-US"),

Volume = 0.5f,

PitchMultiplier = 1.0f

} ;

speechSynthesizer.SpeakUtterance (speechUtterance);

}

}
Dependency Service
Easily call into platform-specific code
■
In the common code
■
Code to an Interface
■
Use DependencyService
■
For each platform
■
implement the Interface
■
use Dependency
attribute on the
assembly
[assembly: Xamarin.Forms.Dependency (typeof (Speech))]


public class Speech : ITextToSpeech

{

public Speech () { }

public void Speak (string text)

{

var speechSynthesizer = new AVSpeechSynthesizer ();

var speechUtterance = new AVSpeechUtterance (text) {

Rate = AVSpeechUtterance.MaximumSpeechRate/4,

Voice = AVSpeechSynthesisVoice.FromLanguage ("en-US"),

Volume = 0.5f,

PitchMultiplier = 1.0f

} ;

speechSynthesizer.SpeakUtterance (speechUtterance);

}

}
Data Binding
Sync views and models
■
Enables MVVM-style development
■
SetBinding in C#
■
{Binding} in XAML
■
also supports the Command pattern
Custom Renderers
Extend or Create Xamarin.Forms Controls
■
Subclass the built-in Platform Renderers
■
Build your own Xamarin.Forms

control and renderers

(eg. OxyPlot)
Further Reading…
■
developer.xamarin.com
■
forums.xamarin.com
■
Creating Mobile Apps with
Xamarin.Forms - Charles Petzold

Available as a FREE download
Thanks!
Nish Anil
@nishanil | nish@xamarin.com

More Related Content

What's hot

Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Xamarin
 
Xamarin overview droidcon.tn
Xamarin overview   droidcon.tnXamarin overview   droidcon.tn
Xamarin overview droidcon.tnHoussem Dellai
 
Introduction to Mobile Development with Xamarin -DotNet Westide
Introduction to Mobile Development with Xamarin -DotNet WestideIntroduction to Mobile Development with Xamarin -DotNet Westide
Introduction to Mobile Development with Xamarin -DotNet WestideJames Montemagno
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UIXamarin
 
Native iOS and Android Development with Xamarin
Native iOS and Android Development with XamarinNative iOS and Android Development with Xamarin
Native iOS and Android Development with XamarinJames Montemagno
 
Dotnetconf - Introduction to Xamarin and Xamarin.Forms
Dotnetconf - Introduction to Xamarin and Xamarin.FormsDotnetconf - Introduction to Xamarin and Xamarin.Forms
Dotnetconf - Introduction to Xamarin and Xamarin.FormsJames Montemagno
 
Cross Platform Mobile Development with C# and Xamarin
Cross Platform Mobile Development with C# and XamarinCross Platform Mobile Development with C# and Xamarin
Cross Platform Mobile Development with C# and XamarinKMS Technology
 
Xamarin Overview by Houssem Dellai
Xamarin Overview by Houssem DellaiXamarin Overview by Houssem Dellai
Xamarin Overview by Houssem DellaiHoussem Dellai
 
Xamarin cross platform
Xamarin cross platformXamarin cross platform
Xamarin cross platformGuada Casuso
 
Introduction to Xamarin
Introduction to XamarinIntroduction to Xamarin
Introduction to XamarinGuy Barrette
 
Highlights from the Xamarin Evolve 2016 conference
Highlights from the Xamarin Evolve 2016 conferenceHighlights from the Xamarin Evolve 2016 conference
Highlights from the Xamarin Evolve 2016 conferenceChristopher Miller
 
Getting Started with iOS & Android Development Using Xamarin & Visual Studio
Getting Started with iOS & Android Development Using Xamarin & Visual StudioGetting Started with iOS & Android Development Using Xamarin & Visual Studio
Getting Started with iOS & Android Development Using Xamarin & Visual StudioMark Arteaga
 
Building Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual StudioBuilding Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual StudioXamarin
 
Mobile Cross-Platform App Development in C# with Xamarin
Mobile Cross-Platform App Development in C# with XamarinMobile Cross-Platform App Development in C# with Xamarin
Mobile Cross-Platform App Development in C# with XamarinNick Landry
 
Xamarin Cross-Platform with Xamarin.Form, MvvmCross
Xamarin Cross-Platform with Xamarin.Form, MvvmCrossXamarin Cross-Platform with Xamarin.Form, MvvmCross
Xamarin Cross-Platform with Xamarin.Form, MvvmCrossTri Nguyen
 
Cross Platform Development with Xamarin
Cross Platform Development with XamarinCross Platform Development with Xamarin
Cross Platform Development with Xamarinbryan costanich
 

What's hot (20)

An introduction to Xamarin
An introduction to XamarinAn introduction to Xamarin
An introduction to Xamarin
 
Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4
 
Xamarin overview droidcon.tn
Xamarin overview   droidcon.tnXamarin overview   droidcon.tn
Xamarin overview droidcon.tn
 
Introduction to Mobile Development with Xamarin -DotNet Westide
Introduction to Mobile Development with Xamarin -DotNet WestideIntroduction to Mobile Development with Xamarin -DotNet Westide
Introduction to Mobile Development with Xamarin -DotNet Westide
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UI
 
Native iOS and Android Development with Xamarin
Native iOS and Android Development with XamarinNative iOS and Android Development with Xamarin
Native iOS and Android Development with Xamarin
 
Dotnetconf - Introduction to Xamarin and Xamarin.Forms
Dotnetconf - Introduction to Xamarin and Xamarin.FormsDotnetconf - Introduction to Xamarin and Xamarin.Forms
Dotnetconf - Introduction to Xamarin and Xamarin.Forms
 
Cross Platform Mobile Development with C# and Xamarin
Cross Platform Mobile Development with C# and XamarinCross Platform Mobile Development with C# and Xamarin
Cross Platform Mobile Development with C# and Xamarin
 
Xamarin Forms
Xamarin FormsXamarin Forms
Xamarin Forms
 
Xamarin Overview by Houssem Dellai
Xamarin Overview by Houssem DellaiXamarin Overview by Houssem Dellai
Xamarin Overview by Houssem Dellai
 
Xamarin cross platform
Xamarin cross platformXamarin cross platform
Xamarin cross platform
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Introduction to Xamarin
Introduction to XamarinIntroduction to Xamarin
Introduction to Xamarin
 
Highlights from the Xamarin Evolve 2016 conference
Highlights from the Xamarin Evolve 2016 conferenceHighlights from the Xamarin Evolve 2016 conference
Highlights from the Xamarin Evolve 2016 conference
 
Getting Started with iOS & Android Development Using Xamarin & Visual Studio
Getting Started with iOS & Android Development Using Xamarin & Visual StudioGetting Started with iOS & Android Development Using Xamarin & Visual Studio
Getting Started with iOS & Android Development Using Xamarin & Visual Studio
 
Building Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual StudioBuilding Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual Studio
 
Mobile Cross-Platform App Development in C# with Xamarin
Mobile Cross-Platform App Development in C# with XamarinMobile Cross-Platform App Development in C# with Xamarin
Mobile Cross-Platform App Development in C# with Xamarin
 
Xamarin.Forms
Xamarin.FormsXamarin.Forms
Xamarin.Forms
 
Xamarin Cross-Platform with Xamarin.Form, MvvmCross
Xamarin Cross-Platform with Xamarin.Form, MvvmCrossXamarin Cross-Platform with Xamarin.Form, MvvmCross
Xamarin Cross-Platform with Xamarin.Form, MvvmCross
 
Cross Platform Development with Xamarin
Cross Platform Development with XamarinCross Platform Development with Xamarin
Cross Platform Development with Xamarin
 

Viewers also liked

Building mvvm & single pageapps in js
Building mvvm & single pageapps in jsBuilding mvvm & single pageapps in js
Building mvvm & single pageapps in jsNish Anil
 
Programming iOS in C#
Programming iOS in C#Programming iOS in C#
Programming iOS in C#Frank Krueger
 
Presentación paisajes sonoros c
Presentación paisajes sonoros cPresentación paisajes sonoros c
Presentación paisajes sonoros ciscdm17
 
Wearables with C# and Xamarin
Wearables with C# and XamarinWearables with C# and Xamarin
Wearables with C# and XamarinCraig Dunn
 
Functional GUIs with F#
Functional GUIs with F#Functional GUIs with F#
Functional GUIs with F#Frank Krueger
 
Adding Intelligence To Your Mobile Apps
Adding Intelligence To Your Mobile AppsAdding Intelligence To Your Mobile Apps
Adding Intelligence To Your Mobile AppsMayur Tendulkar
 
用20分鐘搞懂 《系統分析、軟體工程、專案管理與設計模式》
用20分鐘搞懂   《系統分析、軟體工程、專案管理與設計模式》用20分鐘搞懂   《系統分析、軟體工程、專案管理與設計模式》
用20分鐘搞懂 《系統分析、軟體工程、專案管理與設計模式》鍾誠 陳鍾誠
 
HDFS Namenode High Availability
HDFS Namenode High AvailabilityHDFS Namenode High Availability
HDFS Namenode High AvailabilityHortonworks
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.FormsXamarin
 
Recommender Systems with Ruby (adding machine learning, statistics, etc)
Recommender Systems with Ruby (adding machine learning, statistics, etc)Recommender Systems with Ruby (adding machine learning, statistics, etc)
Recommender Systems with Ruby (adding machine learning, statistics, etc)Marcel Caraciolo
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2Dor Moshe
 

Viewers also liked (13)

Building mvvm & single pageapps in js
Building mvvm & single pageapps in jsBuilding mvvm & single pageapps in js
Building mvvm & single pageapps in js
 
Programming iOS in C#
Programming iOS in C#Programming iOS in C#
Programming iOS in C#
 
Xamarin ile Android Uygulama
Xamarin ile Android UygulamaXamarin ile Android Uygulama
Xamarin ile Android Uygulama
 
Apple Watch Intro
Apple Watch IntroApple Watch Intro
Apple Watch Intro
 
Presentación paisajes sonoros c
Presentación paisajes sonoros cPresentación paisajes sonoros c
Presentación paisajes sonoros c
 
Wearables with C# and Xamarin
Wearables with C# and XamarinWearables with C# and Xamarin
Wearables with C# and Xamarin
 
Functional GUIs with F#
Functional GUIs with F#Functional GUIs with F#
Functional GUIs with F#
 
Adding Intelligence To Your Mobile Apps
Adding Intelligence To Your Mobile AppsAdding Intelligence To Your Mobile Apps
Adding Intelligence To Your Mobile Apps
 
用20分鐘搞懂 《系統分析、軟體工程、專案管理與設計模式》
用20分鐘搞懂   《系統分析、軟體工程、專案管理與設計模式》用20分鐘搞懂   《系統分析、軟體工程、專案管理與設計模式》
用20分鐘搞懂 《系統分析、軟體工程、專案管理與設計模式》
 
HDFS Namenode High Availability
HDFS Namenode High AvailabilityHDFS Namenode High Availability
HDFS Namenode High Availability
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.Forms
 
Recommender Systems with Ruby (adding machine learning, statistics, etc)
Recommender Systems with Ruby (adding machine learning, statistics, etc)Recommender Systems with Ruby (adding machine learning, statistics, etc)
Recommender Systems with Ruby (adding machine learning, statistics, etc)
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2
 

Similar to Build cross-platform mobile apps with Xamarin.Forms

Your First Xamarin.Forms App
Your First Xamarin.Forms AppYour First Xamarin.Forms App
Your First Xamarin.Forms AppCraig Dunn
 
Introduction to Xamarin - Confoo 2015
Introduction to Xamarin - Confoo 2015Introduction to Xamarin - Confoo 2015
Introduction to Xamarin - Confoo 2015Guy Barrette
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.FormsJames Montemagno
 
App innovationcircles xamarin
App innovationcircles xamarinApp innovationcircles xamarin
App innovationcircles xamarinMohit Chhabra
 
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)Daniel Meixner
 
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and BeyondState of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and BeyondNick Landry
 
20141216 멜팅팟 부산 세션 ii - cross platform 개발
20141216 멜팅팟 부산   세션 ii - cross platform 개발20141216 멜팅팟 부산   세션 ii - cross platform 개발
20141216 멜팅팟 부산 세션 ii - cross platform 개발영욱 김
 
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ....NET Conf UY
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinPranav Ainavolu
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발영욱 김
 
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test CloudXamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test CloudJames Montemagno
 
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...
Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xam...Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xam...
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...Nick Landry
 
WebAssembly and .NET
WebAssembly and .NETWebAssembly and .NET
WebAssembly and .NETJoanna Lamch
 
Cross platform mobile app development tools review
Cross platform mobile app development tools reviewCross platform mobile app development tools review
Cross platform mobile app development tools reviewUday Kothari
 
Xamarin Platform
Xamarin PlatformXamarin Platform
Xamarin PlatformLiddle Fang
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.FormsBrad Pillow
 
Going Mobile with C#, Visual Studio, and Xamarin
Going Mobile with C#, Visual Studio, and XamarinGoing Mobile with C#, Visual Studio, and Xamarin
Going Mobile with C#, Visual Studio, and XamarinMatthew Soucoup
 
(Christian heilman) firefox
(Christian heilman) firefox(Christian heilman) firefox
(Christian heilman) firefoxNAVER D2
 

Similar to Build cross-platform mobile apps with Xamarin.Forms (20)

Your First Xamarin.Forms App
Your First Xamarin.Forms AppYour First Xamarin.Forms App
Your First Xamarin.Forms App
 
Introduction to Xamarin - Confoo 2015
Introduction to Xamarin - Confoo 2015Introduction to Xamarin - Confoo 2015
Introduction to Xamarin - Confoo 2015
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.Forms
 
App innovationcircles xamarin
App innovationcircles xamarinApp innovationcircles xamarin
App innovationcircles xamarin
 
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
 
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and BeyondState of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
 
20141216 멜팅팟 부산 세션 ii - cross platform 개발
20141216 멜팅팟 부산   세션 ii - cross platform 개발20141216 멜팅팟 부산   세션 ii - cross platform 개발
20141216 멜팅팟 부산 세션 ii - cross platform 개발
 
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with Xamarin
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발
 
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test CloudXamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
 
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...
Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xam...Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xam...
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...
 
WebAssembly and .NET
WebAssembly and .NETWebAssembly and .NET
WebAssembly and .NET
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Cross platform mobile app development tools review
Cross platform mobile app development tools reviewCross platform mobile app development tools review
Cross platform mobile app development tools review
 
Xamarin Platform
Xamarin PlatformXamarin Platform
Xamarin Platform
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.Forms
 
Titanium #MDS13
Titanium #MDS13Titanium #MDS13
Titanium #MDS13
 
Going Mobile with C#, Visual Studio, and Xamarin
Going Mobile with C#, Visual Studio, and XamarinGoing Mobile with C#, Visual Studio, and Xamarin
Going Mobile with C#, Visual Studio, and Xamarin
 
(Christian heilman) firefox
(Christian heilman) firefox(Christian heilman) firefox
(Christian heilman) firefox
 

More from Nish Anil

[MobConf] Programming wearables in c#
[MobConf] Programming wearables in c#[MobConf] Programming wearables in c#
[MobConf] Programming wearables in c#Nish Anil
 
[Bdotnet] Cloud connected mobile apps
[Bdotnet] Cloud connected mobile apps[Bdotnet] Cloud connected mobile apps
[Bdotnet] Cloud connected mobile appsNish Anil
 
Evolve recap XHackers, Bangalore
Evolve recap XHackers, BangaloreEvolve recap XHackers, Bangalore
Evolve recap XHackers, BangaloreNish Anil
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsNish Anil
 
Using mvvm on the web using knockoutjs & ignite ui
Using mvvm on the web using knockoutjs & ignite uiUsing mvvm on the web using knockoutjs & ignite ui
Using mvvm on the web using knockoutjs & ignite uiNish Anil
 
Infragistics: Getting Started with MVVM in WPF & Silverlight
Infragistics: Getting Started with MVVM in WPF & SilverlightInfragistics: Getting Started with MVVM in WPF & Silverlight
Infragistics: Getting Started with MVVM in WPF & SilverlightNish Anil
 

More from Nish Anil (6)

[MobConf] Programming wearables in c#
[MobConf] Programming wearables in c#[MobConf] Programming wearables in c#
[MobConf] Programming wearables in c#
 
[Bdotnet] Cloud connected mobile apps
[Bdotnet] Cloud connected mobile apps[Bdotnet] Cloud connected mobile apps
[Bdotnet] Cloud connected mobile apps
 
Evolve recap XHackers, Bangalore
Evolve recap XHackers, BangaloreEvolve recap XHackers, Bangalore
Evolve recap XHackers, Bangalore
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with Knockoutjs
 
Using mvvm on the web using knockoutjs & ignite ui
Using mvvm on the web using knockoutjs & ignite uiUsing mvvm on the web using knockoutjs & ignite ui
Using mvvm on the web using knockoutjs & ignite ui
 
Infragistics: Getting Started with MVVM in WPF & Silverlight
Infragistics: Getting Started with MVVM in WPF & SilverlightInfragistics: Getting Started with MVVM in WPF & Silverlight
Infragistics: Getting Started with MVVM in WPF & Silverlight
 

Recently uploaded

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Build cross-platform mobile apps with Xamarin.Forms

  • 1. Say Hello To Xamarin.Forms Nish Anil @nishanil | nish@xamarin.com
  • 2. Traditional Xamarin Development Using the Native UI SDKs ■ Build native UIs ■ UIKit & Storyboards on iOS ■ AXML for Android ■ XAML for Windows Phone ■ Write shared C# code ■ Database, Web Services ■ Business Logic ■ Share 60-80% of the code UIKit Layout XAML
  • 3. Using Xamarin.Forms Shared UI Code! To Build the User Interface ■ Use the same strategies for sharing ■ Database, Web Services ■ Business Logic ■ Build the UI with a single shared codebase ■ Share 99% of the code UIKit Layout XAML
  • 4. Using Xamarin.Forms Shared UI Code! ■ Code sharing/re-use ■ Native look and feel ■ Access to native SDKs using Custom Renderers and DependencyService ■ Camera, accelerometer, GPS, ■ NFC & more on Android ■ PassKit & more on iOS ■ Tiles & more on Windows Phone Benefits UIKit Layout XAML Shared C# User Interface Code
  • 5. Meet Xamarin.Forms Build native UIs for iOS, Android and Windows Phone from a single, shared C# codebase.
  • 6. Meet Xamarin.Forms Build native UIs for iOS, Android and Windows Phone from a single, shared C# codebase.
  • 7. Meet Xamarin.Forms Build native UIs for iOS, Android and Windows Phone from a single, shared C# codebase.
  • 8. Meet Xamarin.Forms Build native UIs for iOS, Android and Windows Phone from a single, shared C# codebase.
  • 9. Meet Xamarin.Forms Build native UIs for iOS, Android and Windows Phone from a single, shared C# codebase.
  • 10. Meet Xamarin.Forms Build native UIs for iOS, Android and Windows Phone from a single, shared C# codebase.
  • 11. Meet Xamarin.Forms public class HelloWorld : ContentPage
 {
 public HelloWorld ()
 {
 var button = new Button { Text = "Say Hello" } ;
 button.Clicked += SayHelloClicked;
 Content = new StackLayout {
 new Label { Text = "Hello World" } ,
 button
 };
 } void SayHelloClicked (object s, EventArgs e)
 {
 // do something
 }
 }
 <?xml version="1.0" encoding="UTF-8"?>
 <ContentPage xmlns="http://xamarin.com/schemas/2014/fo x:Class="HelloForms.HelloWorld">
 <StackLayout>
 <Label Text="Hello World" />
 <Button Text="Say Hello" OnClick="SayHelloClicked" />
 </StackLayout>
 </ContentPage>
 
 public partial class HelloWorld : ContentPage {
 public HelloWorld () {
 InitializeComponent ();
 }
 void SayHelloClicked (object s, EventArgs e) {
 // do something
 }
 } C# XAML
  • 12. Demo ■ File > New Project ■ Create a screen ■ Add some code ■ Run on iOS, Android, 
 & Windows Phone
  • 13.
  • 14. How Xamarin.Forms works Anatomy of a Xamarin.Forms Solution ■ PCL or Shared Project
  • 15. How Xamarin.Forms works Anatomy of a Xamarin.Forms Solution ■ PCL or Shared Project ■ NuGet Package
  • 16. How Xamarin.Forms works Anatomy of a Xamarin.Forms Solution ■ PCL or Shared Project ■ NuGet Package ■ App Class
  • 17. How Xamarin.Forms works Anatomy of a Xamarin.Forms Solution ■ PCL or Shared Project ■ NuGet Package ■ App Class ■ Android app
  • 18. How Xamarin.Forms works Anatomy of a Xamarin.Forms Solution ■ PCL or Shared Project ■ NuGet Package ■ App Class ■ Android app ■ iOS app
  • 19. How Xamarin.Forms works Anatomy of a Xamarin.Forms Solution ■ PCL or Shared Project ■ NuGet Package ■ App Class ■ Android app ■ iOS app ■ Windows Phone app
  • 20. Platform Renderers Taking Xamarin.Forms UI to the people (devices) ? ? ?
  • 24. Xamarin.Forms brings common UX to everyone iOS does not have a native control for the iPhone, however Xamarin.Forms uses UISplitViewController on iPad. Android has a native 'drawer' control which Xamarin.Forms uses. Windows Phone doesn’t have a comparable UI metaphor, so Xamarin.Forms provides an implementation. MasterDetailPage
  • 25. Xamarin.Forms brings common UX to everyone iOS has the UINavigationController which Xamarin.Forms leverages. Android has the navigation stack built in, but Xamarin.Forms adds the automatic 'back' button for API consistency. Windows Phone also has a back- stack with hardware button, so Xamarin.Forms takes advantage of that. NavigationPage
  • 28. Dependency Service Easily call into platform-specific code ■ In the common code ■ Code to an Interface public interface ITextToSpeech
 {
 void Speak (string text);
 }
  • 29. Dependency Service Easily call into platform-specific code ■ In the common code ■ Code to an Interface ■ Use DependencyService public interface ITextToSpeech
 {
 void Speak (string text);
 } DependencyService.Get<ITextToSpeech>().Speak("Hello from Xamarin Forms");

  • 30. Dependency Service Easily call into platform-specific code ■ In the common code ■ Code to an Interface ■ Use DependencyService ■ For each platform ■ implement the Interface [assembly: Xamarin.Forms.Dependency (typeof (Speech))] 
 public class Speech : ITextToSpeech
 {
 public Speech () { }
 public void Speak (string text)
 {
 var speechSynthesizer = new AVSpeechSynthesizer ();
 var speechUtterance = new AVSpeechUtterance (text) {
 Rate = AVSpeechUtterance.MaximumSpeechRate/4,
 Voice = AVSpeechSynthesisVoice.FromLanguage ("en-US"),
 Volume = 0.5f,
 PitchMultiplier = 1.0f
 } ;
 speechSynthesizer.SpeakUtterance (speechUtterance);
 }
 }
  • 31. Dependency Service Easily call into platform-specific code ■ In the common code ■ Code to an Interface ■ Use DependencyService ■ For each platform ■ implement the Interface ■ use Dependency attribute on the assembly [assembly: Xamarin.Forms.Dependency (typeof (Speech))] 
 public class Speech : ITextToSpeech
 {
 public Speech () { }
 public void Speak (string text)
 {
 var speechSynthesizer = new AVSpeechSynthesizer ();
 var speechUtterance = new AVSpeechUtterance (text) {
 Rate = AVSpeechUtterance.MaximumSpeechRate/4,
 Voice = AVSpeechSynthesisVoice.FromLanguage ("en-US"),
 Volume = 0.5f,
 PitchMultiplier = 1.0f
 } ;
 speechSynthesizer.SpeakUtterance (speechUtterance);
 }
 }
  • 32. Data Binding Sync views and models ■ Enables MVVM-style development ■ SetBinding in C# ■ {Binding} in XAML ■ also supports the Command pattern
  • 33. Custom Renderers Extend or Create Xamarin.Forms Controls ■ Subclass the built-in Platform Renderers ■ Build your own Xamarin.Forms
 control and renderers
 (eg. OxyPlot)
  • 34. Further Reading… ■ developer.xamarin.com ■ forums.xamarin.com ■ Creating Mobile Apps with Xamarin.Forms - Charles Petzold
 Available as a FREE download
  • 35. Thanks! Nish Anil @nishanil | nish@xamarin.com