SlideShare a Scribd company logo
1 of 33
Download to read offline
“HELLO WORLD”
WITH 	

XAMARIN 	

AND 	

VISUAL STUDIO 2013
Presented at the	

Indy .NET Mobile Developers Group, May 2014	

Brad Pillow, PillowSoft LLC
GETTING STARTED: 	

XAMARIN MAC
• Using Android? Install the Android SDK from here:
http://developer.android.com/sdk/index.html#download	

• Using iOS? Sign up to be an iOS developer here and
then download tools: https://developer.apple.com/
programs/ios/	

• Developing for iOS or Android? Download Xamarin tools for
the PC: http://xamarin.com/download#	

• Get your free C#T-Shirt like mine here: https://xamarin.com/
sharp-shirt
GETTING STARTED:	

VS2013
• DownloadVS2013: http://www.visualstudio.com/en-us/
downloads (Note: Xamarin will not work with Express
versions!)	

• Developing for iOS (see previous slide)	

• Developing for Android (see previous slide)	

• Developing for Windows Phone 8? Download: https://
dev.windowsphone.com/en-us/downloadsdk	

• Developing for iOS or Android? Download Xamarin tools for
the PC: http://xamarin.com/download#
PREPARING FORTHISTALK	

• I updated to the alpha release of Xamarin…i.e. my IDE has
the new look and feel	

• I decided to update my Android SDK…bad idea. I got an
error when opening the UI layout file,“layout renders
disconnected”…see this link for a temporary fix: http://
forums.xamarin.com/discussion/14344/disconnected-from-
layout-renderer-error-after-updating-android-sdk-tools-to-
version-22-6	

• Ugh!
PROJECT LAYOUT
IOS
CHOOSING AN IOS PROJECT
IOS STARTUP
IOS DEFAULT STORYBOARD
• Storyboards are view
editing with transition
information	

• Single view project
instantiated a view on
startup
XAMARIN IOS UI EDITOR
IOS RESULT
ADD A BUTTON AND	

CLICK HANDLER
ANDROID
ANDROID SDK INSTALL
CHOOSING AN	

ANDROID PROJECT
STARTINGTHE EMULATOR
STARTINGTHE EMULATOR
ANDROID CODE
ANDROID WITHVIEW EDIT
ANDROID DEFAULTVIEW
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

>

<Button 

android:id="@+id/myButton"

android:layout_width="fill_parent" 

android:layout_height="wrap_content" 

android:text="@string/hello"

/>
<Button 

android:id="@+id/myButton2"

android:layout_width="fill_parent" 

android:layout_height="wrap_content" 

android:text="@string/hello2"

/>

</LinearLayout>



WINDOWS PHONE
WINDOWS PHONE 8.1
• If running in aVM like Parallels, you will need to
turn on nested virtualization: http://
kb.parallels.com/en/115211
WP8 NEW PROJECT
EMPTYVIEW
ADD A BUTTON
AND RUN…
ADD INTERACTION
TOOLSTO STAY CROSS
PLATFORM
• Universal Projects (VS2013, coming to Xamarin): here
and here	

• Shared Project Reference Manager	

• PCL - Portable Class Libraries	

• Project Linker - aliases to files in a project	

• Blog on shared projects forVS2013
BUT I JUST WANTTO DRAW A
PICTURE
• For now…platform specific	

• System.Drawing cross-platform coming from
Xamarin
F# DSL FOR UI
this.mainModel <- new MainViewModel()
!
let payButton = Button (text = "Click Me!")
let subtotalLabel = Label (text = "Subtotal:")
let subtotalTextField = TextField ()
let tipPercentLabel = Label (text = "Tip Percent:")
let tipPercentTextField = TextField ()
let tipPercentSlider = Slider(min = 0., max = 100.)
let totalLabel = Label (text = "Total:")
let totalValueTextField = TextField ()
!
let tipView = View(content = [
subtotalLabel; subtotalTextField;
tipPercentSlider; tipPercentLabel; tipPercentTextField;
totalLabel; totalValueTextField;
payButton;
loadTemplateButton;
loadMarkdownButton;
webView;
])
!
let _ = this.mainModel.TipPercent.Subscribe(fun f -> printfn "slider moved to %f" f)
let _ = this.mainModel.Subtotal.Subscribe(fun f -> printfn “sub-total is %f" f)
!
let altUIBindings = [
Command(payButton, this.mainModel.PayCommand );
Command(loadTemplateButton, loadTemplateCommand );
Command(loadMarkdownButton, loadMarkdownCommand );
ValueToFromFloat(tipPercentSlider, this.mainModel.TipPercent);
ValueToFromString(tipPercentTextField, this.mainModel.TipPercent |> floatToStringProperty);
ValueToString(subtotalTextField, this.mainModel.Subtotal |> floatToStringProperty)
ValueFromString(totalValueTextField, this.mainModel.CalculatedTotal |> floatToStringProperty)
]
GOOD OPEN SOURCE APPS
TO LOOK AT
• My-StepCounter1: builds with
the starter version of Xamarin
and works on iOS and Android
• Tasky Portable2 : a cross
platform task manager.Works
on iOS, Android and Windows
Phone.
1. https://github.com/MichaelJames6/My-StepCounter	

2. http://docs.xamarin.com/content/TaskyPortable/
TIPS
• On iOS, use the simulator as much as you can.Turn
around is fastest with it.	

• On Android, use the device.Turn around is fastest on
it. Also the simulator has a nasty restriction on GREF’s
(handles to native Java objects form C#, i.e. UI
controls).	

• On WP8…I don’t know since I don’t have a device.
THANKS!

More Related Content

What's hot

Mobile development strategies with MVVM
Mobile development strategies with MVVMMobile development strategies with MVVM
Mobile development strategies with MVVMJames Montemagno
 
End to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih XamarinEnd to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih XamarinJames Montemagno
 
Desarrollo de aplicaciones Windows Phone con Silverlight 8.1
Desarrollo de aplicaciones Windows Phone con Silverlight 8.1Desarrollo de aplicaciones Windows Phone con Silverlight 8.1
Desarrollo de aplicaciones Windows Phone con Silverlight 8.1Javier Suárez Ruiz
 
Xamarin: The Future of App Development
Xamarin: The Future of App DevelopmentXamarin: The Future of App Development
Xamarin: The Future of App DevelopmentJames Montemagno
 
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.FormsBienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.FormsVicente Gerardo Guzman Lucio
 
4 JavaScript Tools Every Designer Should Know About
4 JavaScript Tools Every Designer Should Know About4 JavaScript Tools Every Designer Should Know About
4 JavaScript Tools Every Designer Should Know AboutAaron Tweeton
 
Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)Craig Dunn
 
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material DesignEvovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material DesignJames Montemagno
 
.NET Everywhere and for Everyone
.NET Everywhere and for Everyone.NET Everywhere and for Everyone
.NET Everywhere and for EveryoneJames Montemagno
 
Finding the sweet spot - blending the best of native and web
Finding the sweet spot - blending the best of native and webFinding the sweet spot - blending the best of native and web
Finding the sweet spot - blending the best of native and webShawn Jansepar
 
Making Cross-Platform apps with Xamarin
Making Cross-Platform apps with XamarinMaking Cross-Platform apps with Xamarin
Making Cross-Platform apps with XamarinDiogo Cardoso
 
HalfStack fast but not furious
HalfStack fast but not furiousHalfStack fast but not furious
HalfStack fast but not furiousAnna Migas
 
iPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone DevelopmentiPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone Developmentandriajensen
 
Features in love
Features in loveFeatures in love
Features in lovebmeme
 
Build2020: Xamarin.Forms Experts Q&A
Build2020: Xamarin.Forms Experts Q&ABuild2020: Xamarin.Forms Experts Q&A
Build2020: Xamarin.Forms Experts Q&ABrandon Minnick, MBA
 
WP-CLI For The Win
WP-CLI For The WinWP-CLI For The Win
WP-CLI For The WinMicah Wood
 
Building 5 star review apps with Xamarin Test Cloud
Building 5 star review apps with Xamarin Test CloudBuilding 5 star review apps with Xamarin Test Cloud
Building 5 star review apps with Xamarin Test CloudGerald Versluis
 
Accelerating Xamarin Development
Accelerating Xamarin DevelopmentAccelerating Xamarin Development
Accelerating Xamarin DevelopmentArul Kumaran
 

What's hot (20)

Mobile development strategies with MVVM
Mobile development strategies with MVVMMobile development strategies with MVVM
Mobile development strategies with MVVM
 
End to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih XamarinEnd to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih Xamarin
 
Desarrollo de aplicaciones Windows Phone con Silverlight 8.1
Desarrollo de aplicaciones Windows Phone con Silverlight 8.1Desarrollo de aplicaciones Windows Phone con Silverlight 8.1
Desarrollo de aplicaciones Windows Phone con Silverlight 8.1
 
Xamarin: The Future of App Development
Xamarin: The Future of App DevelopmentXamarin: The Future of App Development
Xamarin: The Future of App Development
 
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.FormsBienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
 
Azure App Service Helpers
Azure App Service HelpersAzure App Service Helpers
Azure App Service Helpers
 
4 JavaScript Tools Every Designer Should Know About
4 JavaScript Tools Every Designer Should Know About4 JavaScript Tools Every Designer Should Know About
4 JavaScript Tools Every Designer Should Know About
 
Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)
 
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material DesignEvovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
 
Html1
Html1Html1
Html1
 
.NET Everywhere and for Everyone
.NET Everywhere and for Everyone.NET Everywhere and for Everyone
.NET Everywhere and for Everyone
 
Finding the sweet spot - blending the best of native and web
Finding the sweet spot - blending the best of native and webFinding the sweet spot - blending the best of native and web
Finding the sweet spot - blending the best of native and web
 
Making Cross-Platform apps with Xamarin
Making Cross-Platform apps with XamarinMaking Cross-Platform apps with Xamarin
Making Cross-Platform apps with Xamarin
 
HalfStack fast but not furious
HalfStack fast but not furiousHalfStack fast but not furious
HalfStack fast but not furious
 
iPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone DevelopmentiPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone Development
 
Features in love
Features in loveFeatures in love
Features in love
 
Build2020: Xamarin.Forms Experts Q&A
Build2020: Xamarin.Forms Experts Q&ABuild2020: Xamarin.Forms Experts Q&A
Build2020: Xamarin.Forms Experts Q&A
 
WP-CLI For The Win
WP-CLI For The WinWP-CLI For The Win
WP-CLI For The Win
 
Building 5 star review apps with Xamarin Test Cloud
Building 5 star review apps with Xamarin Test CloudBuilding 5 star review apps with Xamarin Test Cloud
Building 5 star review apps with Xamarin Test Cloud
 
Accelerating Xamarin Development
Accelerating Xamarin DevelopmentAccelerating Xamarin Development
Accelerating Xamarin Development
 

Viewers also liked

Student managed fund final
Student managed fund finalStudent managed fund final
Student managed fund finalMaria Sanchez
 
Mobile 2000
Mobile 2000Mobile 2000
Mobile 2000eaiti
 
Evaluation Part 1
Evaluation Part 1Evaluation Part 1
Evaluation Part 1SophieB23
 
Nitesh Tiwari resume
Nitesh Tiwari resumeNitesh Tiwari resume
Nitesh Tiwari resumeNitesh Tiwari
 
презентация на ресепшин
презентация на ресепшинпрезентация на ресепшин
презентация на ресепшинTatyana Dubrova
 
Autodesk inventor basic tools
Autodesk inventor basic toolsAutodesk inventor basic tools
Autodesk inventor basic toolsAshutosh Gupta
 
Stateof cto career_2002
Stateof cto career_2002Stateof cto career_2002
Stateof cto career_2002eaiti
 
Presentasi april mei cantik
Presentasi april mei cantikPresentasi april mei cantik
Presentasi april mei cantikwakafquran
 
1 pigmentation
1 pigmentation1 pigmentation
1 pigmentationAhmed Amer
 
10 basics of human genetics
10 basics of human genetics10 basics of human genetics
10 basics of human geneticsAhmed Amer
 
Using Hadoop
Using HadoopUsing Hadoop
Using Hadoopeaiti
 
Personal development
Personal developmentPersonal development
Personal developmentNotty Butt
 
observasi psikologi pendidikan MAN 2 Model Medan
observasi psikologi pendidikan MAN 2 Model Medanobservasi psikologi pendidikan MAN 2 Model Medan
observasi psikologi pendidikan MAN 2 Model Medan251304
 
[하종욱 설명서] IN 기아자동차
[하종욱 설명서] IN 기아자동차[하종욱 설명서] IN 기아자동차
[하종욱 설명서] IN 기아자동차Jong Uk Ha
 
Push to pull
Push to pullPush to pull
Push to pulleaiti
 
ERAMIS Tempus Project
ERAMIS Tempus ProjectERAMIS Tempus Project
ERAMIS Tempus ProjectPROMISproject
 
Dions globalsoa web2presentation1_2006
Dions globalsoa web2presentation1_2006Dions globalsoa web2presentation1_2006
Dions globalsoa web2presentation1_2006eaiti
 
Washdc cto-0905-2003
Washdc cto-0905-2003Washdc cto-0905-2003
Washdc cto-0905-2003eaiti
 
PROMIS Tempus Project
PROMIS Tempus ProjectPROMIS Tempus Project
PROMIS Tempus ProjectPROMISproject
 

Viewers also liked (20)

Student managed fund final
Student managed fund finalStudent managed fund final
Student managed fund final
 
Mobile 2000
Mobile 2000Mobile 2000
Mobile 2000
 
Evaluation Part 1
Evaluation Part 1Evaluation Part 1
Evaluation Part 1
 
Nitesh Tiwari resume
Nitesh Tiwari resumeNitesh Tiwari resume
Nitesh Tiwari resume
 
презентация на ресепшин
презентация на ресепшинпрезентация на ресепшин
презентация на ресепшин
 
Autodesk inventor basic tools
Autodesk inventor basic toolsAutodesk inventor basic tools
Autodesk inventor basic tools
 
Stateof cto career_2002
Stateof cto career_2002Stateof cto career_2002
Stateof cto career_2002
 
Presentasi april mei cantik
Presentasi april mei cantikPresentasi april mei cantik
Presentasi april mei cantik
 
1 pigmentation
1 pigmentation1 pigmentation
1 pigmentation
 
10 basics of human genetics
10 basics of human genetics10 basics of human genetics
10 basics of human genetics
 
Using Hadoop
Using HadoopUsing Hadoop
Using Hadoop
 
Nagaraj
NagarajNagaraj
Nagaraj
 
Personal development
Personal developmentPersonal development
Personal development
 
observasi psikologi pendidikan MAN 2 Model Medan
observasi psikologi pendidikan MAN 2 Model Medanobservasi psikologi pendidikan MAN 2 Model Medan
observasi psikologi pendidikan MAN 2 Model Medan
 
[하종욱 설명서] IN 기아자동차
[하종욱 설명서] IN 기아자동차[하종욱 설명서] IN 기아자동차
[하종욱 설명서] IN 기아자동차
 
Push to pull
Push to pullPush to pull
Push to pull
 
ERAMIS Tempus Project
ERAMIS Tempus ProjectERAMIS Tempus Project
ERAMIS Tempus Project
 
Dions globalsoa web2presentation1_2006
Dions globalsoa web2presentation1_2006Dions globalsoa web2presentation1_2006
Dions globalsoa web2presentation1_2006
 
Washdc cto-0905-2003
Washdc cto-0905-2003Washdc cto-0905-2003
Washdc cto-0905-2003
 
PROMIS Tempus Project
PROMIS Tempus ProjectPROMIS Tempus Project
PROMIS Tempus Project
 

Similar to Build cross-platform mobile apps with Xamarin and Visual Studio 2013

Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.FormsBrad Pillow
 
Your First Xamarin.Forms App
Your First Xamarin.Forms AppYour First Xamarin.Forms App
Your First Xamarin.Forms AppCraig Dunn
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumTechday7
 
Cross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual StudioCross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual Studiobryan costanich
 
App Development: Create Cross Platform Mobile App with .NETStandard 2.0
App Development: Create Cross Platform Mobile App with .NETStandard 2.0App Development: Create Cross Platform Mobile App with .NETStandard 2.0
App Development: Create Cross Platform Mobile App with .NETStandard 2.0Marvin Heng
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCraig Dunn
 
APAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsAPAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsNish Anil
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titaniumNaga Harish M
 
Introduction to Xamarin - Confoo 2015
Introduction to Xamarin - Confoo 2015Introduction to Xamarin - Confoo 2015
Introduction to Xamarin - Confoo 2015Guy Barrette
 
Hybrid Apps with Ionic Framework
Hybrid Apps with Ionic FrameworkHybrid Apps with Ionic Framework
Hybrid Apps with Ionic FrameworkBramus Van Damme
 
Building GPU-Accelerated Mobile Application Interfaces with Starling and Feat...
Building GPU-Accelerated Mobile Application Interfaces with Starling and Feat...Building GPU-Accelerated Mobile Application Interfaces with Starling and Feat...
Building GPU-Accelerated Mobile Application Interfaces with Starling and Feat...Joseph Labrecque
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do ThatNathan Smith
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Visug
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Doris Chen
 
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
 
Empowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris MillsEmpowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris MillsFITC
 
Empowering the Mobile Web - Mills
Empowering the Mobile Web - MillsEmpowering the Mobile Web - Mills
Empowering the Mobile Web - MillsCodemotion
 
Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"Chris Mills
 
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossC# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossFlavius-Radu Demian
 
Ignite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseIgnite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseJen Looper
 

Similar to Build cross-platform mobile apps with Xamarin and Visual Studio 2013 (20)

Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.Forms
 
Your First Xamarin.Forms App
Your First Xamarin.Forms AppYour First Xamarin.Forms App
Your First Xamarin.Forms App
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Cross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual StudioCross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual Studio
 
App Development: Create Cross Platform Mobile App with .NETStandard 2.0
App Development: Create Cross Platform Mobile App with .NETStandard 2.0App Development: Create Cross Platform Mobile App with .NETStandard 2.0
App Development: Create Cross Platform Mobile App with .NETStandard 2.0
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with Mono
 
APAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsAPAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.Forms
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Introduction to Xamarin - Confoo 2015
Introduction to Xamarin - Confoo 2015Introduction to Xamarin - Confoo 2015
Introduction to Xamarin - Confoo 2015
 
Hybrid Apps with Ionic Framework
Hybrid Apps with Ionic FrameworkHybrid Apps with Ionic Framework
Hybrid Apps with Ionic Framework
 
Building GPU-Accelerated Mobile Application Interfaces with Starling and Feat...
Building GPU-Accelerated Mobile Application Interfaces with Starling and Feat...Building GPU-Accelerated Mobile Application Interfaces with Starling and Feat...
Building GPU-Accelerated Mobile Application Interfaces with Starling and Feat...
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do That
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
 
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
 
Empowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris MillsEmpowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris Mills
 
Empowering the Mobile Web - Mills
Empowering the Mobile Web - MillsEmpowering the Mobile Web - Mills
Empowering the Mobile Web - Mills
 
Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"
 
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossC# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
 
Ignite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseIgnite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and Firebase
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 

Recently uploaded (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 

Build cross-platform mobile apps with Xamarin and Visual Studio 2013

  • 1. “HELLO WORLD” WITH XAMARIN AND VISUAL STUDIO 2013 Presented at the Indy .NET Mobile Developers Group, May 2014 Brad Pillow, PillowSoft LLC
  • 2. GETTING STARTED: XAMARIN MAC • Using Android? Install the Android SDK from here: http://developer.android.com/sdk/index.html#download • Using iOS? Sign up to be an iOS developer here and then download tools: https://developer.apple.com/ programs/ios/ • Developing for iOS or Android? Download Xamarin tools for the PC: http://xamarin.com/download# • Get your free C#T-Shirt like mine here: https://xamarin.com/ sharp-shirt
  • 3. GETTING STARTED: VS2013 • DownloadVS2013: http://www.visualstudio.com/en-us/ downloads (Note: Xamarin will not work with Express versions!) • Developing for iOS (see previous slide) • Developing for Android (see previous slide) • Developing for Windows Phone 8? Download: https:// dev.windowsphone.com/en-us/downloadsdk • Developing for iOS or Android? Download Xamarin tools for the PC: http://xamarin.com/download#
  • 4. PREPARING FORTHISTALK • I updated to the alpha release of Xamarin…i.e. my IDE has the new look and feel • I decided to update my Android SDK…bad idea. I got an error when opening the UI layout file,“layout renders disconnected”…see this link for a temporary fix: http:// forums.xamarin.com/discussion/14344/disconnected-from- layout-renderer-error-after-updating-android-sdk-tools-to- version-22-6 • Ugh!
  • 6. IOS
  • 7. CHOOSING AN IOS PROJECT
  • 9. IOS DEFAULT STORYBOARD • Storyboards are view editing with transition information • Single view project instantiated a view on startup
  • 10. XAMARIN IOS UI EDITOR
  • 12. ADD A BUTTON AND CLICK HANDLER
  • 20. ANDROID DEFAULTVIEW <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android"
 android:orientation="vertical"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 >
 <Button 
 android:id="@+id/myButton"
 android:layout_width="fill_parent" 
 android:layout_height="wrap_content" 
 android:text="@string/hello"
 /> <Button 
 android:id="@+id/myButton2"
 android:layout_width="fill_parent" 
 android:layout_height="wrap_content" 
 android:text="@string/hello2"
 />
 </LinearLayout>
 

  • 22. WINDOWS PHONE 8.1 • If running in aVM like Parallels, you will need to turn on nested virtualization: http:// kb.parallels.com/en/115211
  • 28. TOOLSTO STAY CROSS PLATFORM • Universal Projects (VS2013, coming to Xamarin): here and here • Shared Project Reference Manager • PCL - Portable Class Libraries • Project Linker - aliases to files in a project • Blog on shared projects forVS2013
  • 29. BUT I JUST WANTTO DRAW A PICTURE • For now…platform specific • System.Drawing cross-platform coming from Xamarin
  • 30. F# DSL FOR UI this.mainModel <- new MainViewModel() ! let payButton = Button (text = "Click Me!") let subtotalLabel = Label (text = "Subtotal:") let subtotalTextField = TextField () let tipPercentLabel = Label (text = "Tip Percent:") let tipPercentTextField = TextField () let tipPercentSlider = Slider(min = 0., max = 100.) let totalLabel = Label (text = "Total:") let totalValueTextField = TextField () ! let tipView = View(content = [ subtotalLabel; subtotalTextField; tipPercentSlider; tipPercentLabel; tipPercentTextField; totalLabel; totalValueTextField; payButton; loadTemplateButton; loadMarkdownButton; webView; ]) ! let _ = this.mainModel.TipPercent.Subscribe(fun f -> printfn "slider moved to %f" f) let _ = this.mainModel.Subtotal.Subscribe(fun f -> printfn “sub-total is %f" f) ! let altUIBindings = [ Command(payButton, this.mainModel.PayCommand ); Command(loadTemplateButton, loadTemplateCommand ); Command(loadMarkdownButton, loadMarkdownCommand ); ValueToFromFloat(tipPercentSlider, this.mainModel.TipPercent); ValueToFromString(tipPercentTextField, this.mainModel.TipPercent |> floatToStringProperty); ValueToString(subtotalTextField, this.mainModel.Subtotal |> floatToStringProperty) ValueFromString(totalValueTextField, this.mainModel.CalculatedTotal |> floatToStringProperty) ]
  • 31. GOOD OPEN SOURCE APPS TO LOOK AT • My-StepCounter1: builds with the starter version of Xamarin and works on iOS and Android • Tasky Portable2 : a cross platform task manager.Works on iOS, Android and Windows Phone. 1. https://github.com/MichaelJames6/My-StepCounter 2. http://docs.xamarin.com/content/TaskyPortable/
  • 32. TIPS • On iOS, use the simulator as much as you can.Turn around is fastest with it. • On Android, use the device.Turn around is fastest on it. Also the simulator has a nasty restriction on GREF’s (handles to native Java objects form C#, i.e. UI controls). • On WP8…I don’t know since I don’t have a device.