SlideShare a Scribd company logo
@codemillmatt
@codemillmatt codemilltech.com
SR CLOUD DEVELOPER ADVOCATE - MICROSOFT
Matthew Soucoup
INTRODUCTION TO XAMARIN.FORMS
Creating Three Beautiful Apps at Once
@codemillmatt
@codemillmatt
Matt Soucoup
matt.soucoup@microsoft.com
@codemillmatt codemilltech.com
Who is this guy?
Azure	
Red	Shirt	
Dev	Tour	‘17
A	free code-focused	five	hour	demo	of	Azure	by	Scott	Guthrie
October	16th,	Chicago
October	17th,	Dallas
October	18th,	Atlanta
October	19th,	Boston
October	20th,	New	York	City
Reserve	your	spot	now:	http://aka.ms/rst
@codemillmatt
Where to Find Stuff
Slides
slideshare.net/matthewsoucoup
Code
github.code/codemillmatt/conferencetalks
@codemillmatt - matt.soucoup@microsoft.com - codemilltech.com
@codemillmatt
@codemillmatt
@codemillmatt
@codemillmatt
@codemillmatt
Additional
Features and
Platform Access
MVVMUser Interface
Intro to Xamarin.Forms Agenda
@codemillmatt
User Interface
@codemillmatt
Pages
Content Navigation Master/Detail Tabbed Carousel
@codemillmatt
Navigation
Navigation
Page
Root Page
INavigation
Child 2
INavigation
Child 3
INavigation
Modal 1
INavigation
PushAsync()
PushAsync() PushModalAsync()
@codemillmatt
Navigation
Navigation
Page
Root Page
INavigation
Child 2
INavigation
Child 3
INavigation
Modal 1
INavigation
PopAsync()
PopAsync() PopModalAsync()
@codemillmatt
Layouts - Stack
Vertical Horizontal
@codemillmatt
Layouts - Grid
@codemillmatt
ListView
@codemillmatt
TableView
@codemillmatt
Controls
Image
ToolbarItem
BoxView
Label
Button
@codemillmatt
Controls
Entry
ToolbarItem
Switch
Picker
Editor
@codemillmatt
UI Demo
Controls
TableView
ListView
@codemillmatt
MVVM
@codemillmatt
MVVM
Model ViewView-Model
Uses
Shapes for display
Commands
(UI events)Service
Updates values
@codemillmatt
Databinding
ViewView-Model
Displays values
Updates values
Propagates
Automatically
@codemillmatt
public class RecipeViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
string _recipeName;
public string RecipeName
{
get { return _recipeName; }
set
{
if (_recipeName == value)
return;
_recipeName = value;
OnPropertyChanged();
}
}
public void OnPropertyChanged([CallerMemberName]string memberName = "") =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(memberName));
}
INotifyPropertyChanged
@codemillmatt
public void OnPropertyChanged([CallerMemberName]string memberName = "") =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(memberName)
);
Cuz it was at the bottom
@codemillmatt
<Label Text="{Binding RecipeName}" />
...
<Label Text="{Binding Time, StringFormat='{0} prep'}" />
Data Binding - XAML
BindingContext set on parent or control
Binding keyword
Reference view model property
@codemillmatt
Commanding
ViewView-Model
Commands
(UI events)
Service Data Binding
@codemillmatt
public ICommand AddRecipeCommand { get; } =
new Command(async (obj) => await Navigation.PushModalAsync(
new NavigationPage(new EditRecipePage()))
);
Command – View Model
ICommand interface
Action when invoked
Optional bool function for enabling
@codemillmatt
<Button Text="Add" Command="{Binding AddRecipeCommand}" />
Command - XAML
Command property
Binding keyword
One command per control
@codemillmatt
MVVM Demo
Data binding
Commanding
@codemillmatt
Additional Features & Platform Access
@codemillmatt
Messaging Center
Messaging
Center
Object A Object B
SubscribeSend Receive
@codemillmatt
Shared code calls
DependencyService
Register with
DependencyService
Implement on each platformDefine interface
Dependency Service
Platform Specific Functionality in Shared Code
@codemillmatt
public interface IFormsCamera
{
void LaunchCamera();
}
Dependency Service
Define the interface
@codemillmatt
[assembly: Dependency(typeof(AppleCamera))]
namespace Foodie.iOS
{
public class AppleCamera : IFormsCamera
{
public void LaunchCamera()
{
// Some camera stuff
}
}
}
Dependency Service
Platform implementation
@codemillmatt
public void TakePhoto()
{
var camera = DependencyService.Get<IFormsCamera>();
camera.LaunchCamera();
}
Dependency Service - Consume
DependencyService static object
@codemillmatt
Can handle native eventsBindable properties
Referenced in XAMLNative defined control
Bindable Native Views
@codemillmatt
Native View Demo
Referencing
Binding
MessagingCenter
@codemillmatt
Platform Access
• Messaging Center
• Dependency Service
• Bindable Native Views
MVVM
• Data binding
• Commanding
User Interface
• Pages
• Navigation
• Layouts
• Controls
Xamarin.Forms
@codemillmatt
@codemillmatt
Learn More!
Pluralsight: Moving Beyond the Basics with Xamarin.Forms
https://www.pluralsight.com/courses/xamarin-forms-moving-beyond-basics
@codemillmatt
Where to Find Stuff
Slides
slideshare.net/matthewsoucoup
Code
github.code/codemillmatt/conferencetalks
@codemillmatt - matt.soucoup@microsoft.com - codemilltech.com
@codemillmatt
@codemillmatt codemilltech.com
SR CLOUD DEVELOPER ADVOCATE - MICROSOFT
Matthew Soucoup
INTRODUCTION TO XAMARIN.FORMS
Creating Three Beautiful Apps at Once

More Related Content

What's hot

Xamarin overview droidcon.tn
Xamarin overview   droidcon.tnXamarin overview   droidcon.tn
Xamarin overview droidcon.tn
Houssem Dellai
 
Say hello to Xamarin 3
Say hello to Xamarin 3Say hello to Xamarin 3
Say hello to Xamarin 3
Xamarin
 
Xamarin cross platform
Xamarin cross platformXamarin cross platform
Xamarin cross platform
Guada Casuso
 
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
Nick Landry
 
Xamarin Overview by Houssem Dellai
Xamarin Overview by Houssem DellaiXamarin Overview by Houssem Dellai
Xamarin Overview by Houssem Dellai
Houssem Dellai
 
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
Mark Arteaga
 
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
Nick Landry
 
Azure App Service Helpers
Azure App Service HelpersAzure App Service Helpers
Azure App Service Helpers
James Montemagno
 
Th03 lessons-learned-resilient-apps-mobile-app-services
Th03 lessons-learned-resilient-apps-mobile-app-servicesTh03 lessons-learned-resilient-apps-mobile-app-services
Th03 lessons-learned-resilient-apps-mobile-app-services
Matthew Soucoup
 
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
James Montemagno
 
Building a Cross-Platform Mobile App Backend in the Cloud with Node.js
Building a Cross-Platform Mobile App Backend in the Cloud with Node.jsBuilding a Cross-Platform Mobile App Backend in the Cloud with Node.js
Building a Cross-Platform Mobile App Backend in the Cloud with Node.js
Nick Landry
 
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
James 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 Xamarin
KMS Technology
 
Lessons Learned: 4 Months of Xamarin.Forms
Lessons Learned: 4 Months of Xamarin.FormsLessons Learned: 4 Months of Xamarin.Forms
Lessons Learned: 4 Months of Xamarin.Forms
Eric Polerecky
 
Flying High with Xamarin
Flying High with XamarinFlying High with Xamarin
Flying High with Xamarin
Sam Basu
 
Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017
Xamarin
 
Building Mobile Cross-Platform Apps with the Cloud and Push Notifications
Building Mobile Cross-Platform Apps with the Cloud and Push NotificationsBuilding Mobile Cross-Platform Apps with the Cloud and Push Notifications
Building Mobile Cross-Platform Apps with the Cloud and Push Notifications
Nick Landry
 
Xamarin and SAP Mobile Platform for Mobile Enterprise Success
Xamarin and SAP Mobile Platform for Mobile Enterprise SuccessXamarin and SAP Mobile Platform for Mobile Enterprise Success
Xamarin and SAP Mobile Platform for Mobile Enterprise SuccessXamarin
 
Xamarin for iOS developers
Xamarin for iOS developersXamarin for iOS developers
Xamarin for iOS developers
Craig Dunn
 
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
Xamarin
 

What's hot (20)

Xamarin overview droidcon.tn
Xamarin overview   droidcon.tnXamarin overview   droidcon.tn
Xamarin overview droidcon.tn
 
Say hello to Xamarin 3
Say hello to Xamarin 3Say hello to Xamarin 3
Say hello to Xamarin 3
 
Xamarin cross platform
Xamarin cross platformXamarin cross platform
Xamarin cross platform
 
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 Overview by Houssem Dellai
Xamarin Overview by Houssem DellaiXamarin Overview by Houssem Dellai
Xamarin Overview by Houssem Dellai
 
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
 
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
 
Azure App Service Helpers
Azure App Service HelpersAzure App Service Helpers
Azure App Service Helpers
 
Th03 lessons-learned-resilient-apps-mobile-app-services
Th03 lessons-learned-resilient-apps-mobile-app-servicesTh03 lessons-learned-resilient-apps-mobile-app-services
Th03 lessons-learned-resilient-apps-mobile-app-services
 
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
 
Building a Cross-Platform Mobile App Backend in the Cloud with Node.js
Building a Cross-Platform Mobile App Backend in the Cloud with Node.jsBuilding a Cross-Platform Mobile App Backend in the Cloud with Node.js
Building a Cross-Platform Mobile App Backend in the Cloud with Node.js
 
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
 
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
 
Lessons Learned: 4 Months of Xamarin.Forms
Lessons Learned: 4 Months of Xamarin.FormsLessons Learned: 4 Months of Xamarin.Forms
Lessons Learned: 4 Months of Xamarin.Forms
 
Flying High with Xamarin
Flying High with XamarinFlying High with Xamarin
Flying High with Xamarin
 
Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017
 
Building Mobile Cross-Platform Apps with the Cloud and Push Notifications
Building Mobile Cross-Platform Apps with the Cloud and Push NotificationsBuilding Mobile Cross-Platform Apps with the Cloud and Push Notifications
Building Mobile Cross-Platform Apps with the Cloud and Push Notifications
 
Xamarin and SAP Mobile Platform for Mobile Enterprise Success
Xamarin and SAP Mobile Platform for Mobile Enterprise SuccessXamarin and SAP Mobile Platform for Mobile Enterprise Success
Xamarin and SAP Mobile Platform for Mobile Enterprise Success
 
Xamarin for iOS developers
Xamarin for iOS developersXamarin for iOS developers
Xamarin for iOS developers
 
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
 

Similar to Creating 3 Beautiful Apps At Once - Intro To Xamarin.Forms

2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta
Daniel Fisher
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
ukdpe
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
Jonas Follesø
 
Choosing the right Rich Internet Application technology path
Choosing the right Rich Internet Application technology pathChoosing the right Rich Internet Application technology path
Choosing the right Rich Internet Application technology path
marcocasario
 
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
Clint Edmonson
 
Robotlegs on Top of Gaia
Robotlegs on Top of GaiaRobotlegs on Top of Gaia
Robotlegs on Top of Gaia
Jesse Warden
 
Docker Berlin Meetup June 2015: Docker powering Radical Agility @ Zalando Tech
Docker Berlin Meetup June 2015: Docker powering Radical Agility @ Zalando TechDocker Berlin Meetup June 2015: Docker powering Radical Agility @ Zalando Tech
Docker Berlin Meetup June 2015: Docker powering Radical Agility @ Zalando Tech
Henning Jacobs
 
Lessons Learned from Making Resilient Apps with Azure Mobile App Services
Lessons Learned from Making Resilient Apps with Azure Mobile App ServicesLessons Learned from Making Resilient Apps with Azure Mobile App Services
Lessons Learned from Making Resilient Apps with Azure Mobile App Services
Matthew Soucoup
 
Engineering Efficiency in LINE
Engineering Efficiency in LINEEngineering Efficiency in LINE
Engineering Efficiency in LINE
Huy Do
 
Android crash course
Android crash courseAndroid crash course
Android crash course
Showmax Engineering
 
Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009
Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009
Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009
Ramon Durães
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Matt Raible
 
Serverless + Machine Learning – Bringing the best of two worlds together
Serverless + Machine Learning – Bringing the best of two worlds togetherServerless + Machine Learning – Bringing the best of two worlds together
Serverless + Machine Learning – Bringing the best of two worlds together
Vidyasagar Machupalli
 
Flex In Portal Final
Flex In Portal   FinalFlex In Portal   Final
Flex In Portal FinalSunil Patil
 
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
Dominik Obermaier
 
58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services
homeworkping3
 
Developing on AWS
Developing on AWSDeveloping on AWS
Developing on AWS
Brett Gillett
 
What's new in android jakarta gdg (2015-08-26)
What's new in android   jakarta gdg (2015-08-26)What's new in android   jakarta gdg (2015-08-26)
What's new in android jakarta gdg (2015-08-26)
Google
 
Serverless-AWS SAM CLI Session: Developer Meet Up
Serverless-AWS SAM CLI Session: Developer Meet UpServerless-AWS SAM CLI Session: Developer Meet Up
Serverless-AWS SAM CLI Session: Developer Meet Up
Amazon Web Services
 
Getting start Java EE Action-Based MVC with Thymeleaf
Getting start Java EE Action-Based MVC with ThymeleafGetting start Java EE Action-Based MVC with Thymeleaf
Getting start Java EE Action-Based MVC with Thymeleaf
Masatoshi Tada
 

Similar to Creating 3 Beautiful Apps At Once - Intro To Xamarin.Forms (20)

2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
Choosing the right Rich Internet Application technology path
Choosing the right Rich Internet Application technology pathChoosing the right Rich Internet Application technology path
Choosing the right Rich Internet Application technology path
 
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
 
Robotlegs on Top of Gaia
Robotlegs on Top of GaiaRobotlegs on Top of Gaia
Robotlegs on Top of Gaia
 
Docker Berlin Meetup June 2015: Docker powering Radical Agility @ Zalando Tech
Docker Berlin Meetup June 2015: Docker powering Radical Agility @ Zalando TechDocker Berlin Meetup June 2015: Docker powering Radical Agility @ Zalando Tech
Docker Berlin Meetup June 2015: Docker powering Radical Agility @ Zalando Tech
 
Lessons Learned from Making Resilient Apps with Azure Mobile App Services
Lessons Learned from Making Resilient Apps with Azure Mobile App ServicesLessons Learned from Making Resilient Apps with Azure Mobile App Services
Lessons Learned from Making Resilient Apps with Azure Mobile App Services
 
Engineering Efficiency in LINE
Engineering Efficiency in LINEEngineering Efficiency in LINE
Engineering Efficiency in LINE
 
Android crash course
Android crash courseAndroid crash course
Android crash course
 
Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009
Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009
Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
 
Serverless + Machine Learning – Bringing the best of two worlds together
Serverless + Machine Learning – Bringing the best of two worlds togetherServerless + Machine Learning – Bringing the best of two worlds together
Serverless + Machine Learning – Bringing the best of two worlds together
 
Flex In Portal Final
Flex In Portal   FinalFlex In Portal   Final
Flex In Portal Final
 
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
 
58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services
 
Developing on AWS
Developing on AWSDeveloping on AWS
Developing on AWS
 
What's new in android jakarta gdg (2015-08-26)
What's new in android   jakarta gdg (2015-08-26)What's new in android   jakarta gdg (2015-08-26)
What's new in android jakarta gdg (2015-08-26)
 
Serverless-AWS SAM CLI Session: Developer Meet Up
Serverless-AWS SAM CLI Session: Developer Meet UpServerless-AWS SAM CLI Session: Developer Meet Up
Serverless-AWS SAM CLI Session: Developer Meet Up
 
Getting start Java EE Action-Based MVC with Thymeleaf
Getting start Java EE Action-Based MVC with ThymeleafGetting start Java EE Action-Based MVC with Thymeleaf
Getting start Java EE Action-Based MVC with Thymeleaf
 

Creating 3 Beautiful Apps At Once - Intro To Xamarin.Forms