SlideShare une entreprise Scribd logo
1  sur  34
Xamarin 101
WHAT YOU NEED TO KNOW TO GET STARTED WITH XAMARIN.FORMS
TODAY!
About Me Chester (Chet) Hartin
Technical Architect @ Concurrency
Focus: C#, APIs, Messaging services, Xamarin.
GitHub: https://github.com/chesterhartin
Twitter: @ChetHartin
About Me
Chester (Chet) Hartin
Tec hnic al Architec t @Concurrency
Foc us: C# , APIs, Messaging servic es, Xamarin.
GitHub: https:/ / github.c om/ c hesterhartin
Twitter: @ChetHartin
Syllabus
Intro To Xamarin
Basic building blocks of Xamarin.Forms
XAML Introduction
Databinding
View Customization
What to do next?
Intro To Xamarin
Why Xamarin when we have Java, Objective-C, Swift?
• This leads to Write Everything Twice (WET) Development
• Xamarin allows us to write for the iOS (8 and up), Android (API 15 / 4.0.3
and up), WFP, MacOS, Smart watches (iOS/Android), Samsung Smart
devices
When should
I use it?
Why Xamarin when we have Flutter, PhoneGap,
Corona, React Native...
• All of these are great tools!
But…
• Your team knows C#/.Net
• You need multiple-platform apps
• You want a native app performance and/or look &
feel
1000 Feet Above
Xamarin.Forms
XAMARIN.FORMS SHARE A UI
DEFINITION*
History Recap
2011
Founded in 2011 as
MonoTouch/Mono For
Android
2013
Renamed & integration into
Visual Studio / Launch Of
Xamarin Studio
2016
Purchased by Microsoft
•Full time development / support
•Free & 100% open-sourced
What Do I
need?
 PC
 Visual Studio 2017 / 2019
 Mac
 Visual Studio for Mac
 Note: iOS development REQUIRES a
Mac to build/test
Basic Building Blocks
Pages
Layouts
Views
Cells
Flexible
Layout
Standard
Controls
Navigation
Custom
Controls
Data
Binding
XAML
Styles +
Triggers
Maps
Pages – Building Block 1
Layouts –
Building
Block 2
Views – Building
Block 3
Button
Label
Entry
Switch
Activity Indicator
Views – Building Block 3 (cont)
Views Android iOS
Button
Label
Entry
Switch
Activity Indicator
Views – Building Block 3 (cont)
 List View
 Table View
 Image
 Slider
 Date Picker
 Progress bar
 Editor
 Map
 Web View
 Open GL View
 Frame
 … And more!
Cells – Building Block 4
 A View Cell (Cell) is a view optimized for data
templates
 Can use layouts
 Great for a reusable template in a List.
XAML
Introduction
 Code time!
 Anatomy of a Xamarin.Forms App
 Content Page
 Views
 Styles
 Layouts
 Stack
 Grid
 Absolute
Databinding
 How do we show information to the
user?
 How do we get user input?
 Model-View-ViewModel (MVVM)
Basics
 View: knows how to display
 ViewModel: knows what data to
display
 Model: the nouns of the system
Flexible
Layout
Standard
Controls
Navigation
Custom
Controls
Data
Binding
XAML
Styles +
Triggers
Maps
Databinding (cont.)
View
XF Content
Page
ViewModel
Class
Model
Class
Data Data
Events
• View: knows how to display data
• ViewModel: knows what data to display
• Model: the nouns of the system. Data Objects
Databinding
(cont.)
 Code Time!
 Bindable Properties
 Binding a Context
 Converters
View Customization
 What if Xamarin.Forms doesn’t behave
the way I want it to?
 Platform Specific Changes
 Effects
 Behaviors
 Custom Renderers
View Customization (cont.)
 Platform-Specifics
 Use functionality that’s only available on
a specific platform
iOS Android
VisualElement.BlurEffect VisualElement.Elevation
VisualElement.IsShadowEnabled Button.UseDefaultPadding
Entry.AdjustsFontSizeToFitWidth Button.UseDefaultShadow
Entry.CursorColor Entry.ImeOptions (set action)
ListView.SeparatorStyle ListView.IsFastScrollEnabled
NavigationPage.HideNavigationBarSeparator NavigationPage.BarHeight
View
Customization
(cont)
 Effects
 AKA “Custom Renderers Lite”
 Allow the native controls on each platform to be
customized
 Typically used for small styling changes
 Benefits:
 Simplify the customization of a control
 Are reusable
 Can be passed as parameters for increased reuse
View
Customization
(cont.)
 Behaviors
 Attach additional functionality to any
Xamarin.Forms View
 Examples
 Allow n-characters in an entry
 Only allow integers to be entered into an entry
View Customization (cont.)
 Custom Renderers
 Lets developers override the out-of-the-box renderers to customize the
appearance/behavior of Xamarin.Forms on each platform
 Think “can I do this with an effect?” first
 Extend a Xamarin.Forms View
 Required when there’s a need to override methods of a platform-specific
control.
View Customization (cont.)
 Code Time!
 Platform-specific
 Effects
 Behaviors
 Custom Renderers
What to do next?
 Try out these device features:
 Accelerometer, Barometer, Battery, Compass, Connectivity State, etc
 Use plugins
 NuGet packages implement and provide a lot of features!
 Xamarin.Essentials - a must for an interactive app
 Microsoft Learn (or Xamarin University until June 2019)
 https://docs.microsoft.com/en-
us/learn/browse/?roles=developer&term=xamarin
 I recommend all the Xamarin.Forms courses
References
 Documentation
 All available online:
 https://docs.microsoft.com/en-us/xamarin/
 Slack
 Get involved
 https://xamarinchat.herokuapp.com/
 Learn the hot MVVM frameworks
 Prism https://prismlibrary.github.io/
 ReactiveUI https://reactiveui.net/
 MVVMCross https://www.mvvmcross.com/
Resources
 Installing Xamarin: https://docs.microsoft.com/en-us/xamarin/get-
started/installation/?pivots=windows
 Build your first app with Xamarin.Forms:
https://www.youtube.com/watch?v=NGvn-pGZFPA
 Xamarin.Forms roadmap:
https://github.com/xamarin/Xamarin.Forms/wiki/Feature-Roadmap
About Me Chester (Chet) Hartin
Technical Architect @ Concurrency
Focus: C#, APIs, Messaging services, Xamarin.
GitHub: https://github.com/chesterhartin
Twitter: @ChetHartin

Contenu connexe

Tendances

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
 

Tendances (20)

Xamarin Forms
Xamarin FormsXamarin Forms
Xamarin Forms
 
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
 
Xamarin Dev Days Madrid 2017 - Xamarin.Forms
Xamarin Dev Days Madrid 2017 -  Xamarin.FormsXamarin Dev Days Madrid 2017 -  Xamarin.Forms
Xamarin Dev Days Madrid 2017 - Xamarin.Forms
 
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
 
Xamarin overview droidcon.tn
Xamarin overview   droidcon.tnXamarin overview   droidcon.tn
Xamarin overview droidcon.tn
 
The very first steps to make my first Mobile App with Xamarin
The very first steps to make my first Mobile App with XamarinThe very first steps to make my first Mobile App with Xamarin
The very first steps to make my first Mobile App with Xamarin
 
What's new in Xamarin.Forms?
What's new in Xamarin.Forms?What's new in Xamarin.Forms?
What's new in Xamarin.Forms?
 
Build 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.FormsBuild 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.Forms
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UI
 
Xamarin introduction
Xamarin introductionXamarin introduction
Xamarin introduction
 
Developing Cross-platform Native Apps with Xamarin
Developing Cross-platform Native Apps with XamarinDeveloping Cross-platform Native Apps with Xamarin
Developing Cross-platform Native Apps with Xamarin
 
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
 
What's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo DomingoWhat's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo Domingo
 
Creating 3 Beautiful Apps At Once - Intro To Xamarin.Forms
Creating 3 Beautiful Apps At Once - Intro To Xamarin.FormsCreating 3 Beautiful Apps At Once - Intro To Xamarin.Forms
Creating 3 Beautiful Apps At Once - Intro To Xamarin.Forms
 
Xamarin Roadshow
Xamarin RoadshowXamarin Roadshow
Xamarin Roadshow
 
#XamarinDevDays - Cross Platform Native UI with Xamarin.Forms
#XamarinDevDays - Cross Platform Native UI with Xamarin.Forms#XamarinDevDays - Cross Platform Native UI with Xamarin.Forms
#XamarinDevDays - Cross Platform Native UI with Xamarin.Forms
 
Xamarin Forms
Xamarin FormsXamarin Forms
Xamarin Forms
 
Visual Studio Toolbox - Introduction To Xamarin.Forms
Visual Studio Toolbox - Introduction To Xamarin.FormsVisual Studio Toolbox - Introduction To Xamarin.Forms
Visual Studio Toolbox - Introduction To Xamarin.Forms
 
Xamarin first mobile application
Xamarin first mobile applicationXamarin first mobile application
Xamarin first mobile application
 
Xamarin Dev Days - Xamarin.Forms
Xamarin Dev Days -  Xamarin.FormsXamarin Dev Days -  Xamarin.Forms
Xamarin Dev Days - Xamarin.Forms
 

Similaire à Xamarin 101

Xamarin workshop
Xamarin workshopXamarin workshop
Xamarin workshop
Nguyen Hieu
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Frank La Vigne
 

Similaire à Xamarin 101 (20)

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
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.Forms
 
SharePoint Mobile App Development with Xmarin
SharePoint Mobile App Development with XmarinSharePoint Mobile App Development with Xmarin
SharePoint Mobile App Development with Xmarin
 
Introduction to Cross Platform Mobile Apps (Xamarin)
Introduction to Cross Platform Mobile Apps (Xamarin)Introduction to Cross Platform Mobile Apps (Xamarin)
Introduction to Cross Platform Mobile Apps (Xamarin)
 
Xamarin workshop
Xamarin workshopXamarin workshop
Xamarin workshop
 
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
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
 
What's new and next for mobile development with .NET
What's new and next for mobile development with .NETWhat's new and next for mobile development with .NET
What's new and next for mobile development with .NET
 
Getting started with Xamarin Forms
Getting started with Xamarin FormsGetting started with Xamarin Forms
Getting started with Xamarin Forms
 
Xamarin the good, the bad and the ugly
Xamarin  the good, the bad and the uglyXamarin  the good, the bad and the ugly
Xamarin the good, the bad and the ugly
 
Top reasons why to choose xamarin for mobile app development
Top reasons why to choose xamarin for mobile app developmentTop reasons why to choose xamarin for mobile app development
Top reasons why to choose xamarin for mobile app development
 
Stunning Mobile Apps with the Xamarin Visual Design System​
Stunning Mobile Apps with the Xamarin Visual Design System​Stunning Mobile Apps with the Xamarin Visual Design System​
Stunning Mobile Apps with the Xamarin Visual Design System​
 
How Xamarin Is Revolutionizing Mobile Development
How Xamarin Is Revolutionizing Mobile DevelopmentHow Xamarin Is Revolutionizing Mobile Development
How Xamarin Is Revolutionizing Mobile Development
 
Flying High with Xamarin!
Flying High with Xamarin!Flying High with Xamarin!
Flying High with Xamarin!
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
A Lap Around Visual Studio 2010
A Lap Around Visual Studio 2010A Lap Around Visual Studio 2010
A Lap Around Visual Studio 2010
 
Xamarin.Forms Hands On Lab (Begineer)
Xamarin.Forms Hands On Lab (Begineer)Xamarin.Forms Hands On Lab (Begineer)
Xamarin.Forms Hands On Lab (Begineer)
 
Serverless Computing with Azure Functions and Xamarin
Serverless Computing with Azure Functions and XamarinServerless Computing with Azure Functions and Xamarin
Serverless Computing with Azure Functions and Xamarin
 
Designing mobile applications with xamarin
Designing mobile applications with xamarinDesigning mobile applications with xamarin
Designing mobile applications with xamarin
 
RUG-Asia - ALM
RUG-Asia - ALMRUG-Asia - ALM
RUG-Asia - ALM
 

Plus de Chester Hartin

Plus de Chester Hartin (8)

Proxy pattern
Proxy patternProxy pattern
Proxy pattern
 
Asynchronous programming
Asynchronous programmingAsynchronous programming
Asynchronous programming
 
Elapsed time
Elapsed timeElapsed time
Elapsed time
 
Dependency injection
Dependency injectionDependency injection
Dependency injection
 
Map kit
Map kitMap kit
Map kit
 
Hash tables
Hash tablesHash tables
Hash tables
 
Parallel extensions
Parallel extensionsParallel extensions
Parallel extensions
 
Reflection
ReflectionReflection
Reflection
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Dernier (20)

Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 

Xamarin 101

  • 1. Xamarin 101 WHAT YOU NEED TO KNOW TO GET STARTED WITH XAMARIN.FORMS TODAY!
  • 2. About Me Chester (Chet) Hartin Technical Architect @ Concurrency Focus: C#, APIs, Messaging services, Xamarin. GitHub: https://github.com/chesterhartin Twitter: @ChetHartin About Me Chester (Chet) Hartin Tec hnic al Architec t @Concurrency Foc us: C# , APIs, Messaging servic es, Xamarin. GitHub: https:/ / github.c om/ c hesterhartin Twitter: @ChetHartin
  • 3.
  • 4. Syllabus Intro To Xamarin Basic building blocks of Xamarin.Forms XAML Introduction Databinding View Customization What to do next?
  • 5. Intro To Xamarin Why Xamarin when we have Java, Objective-C, Swift? • This leads to Write Everything Twice (WET) Development • Xamarin allows us to write for the iOS (8 and up), Android (API 15 / 4.0.3 and up), WFP, MacOS, Smart watches (iOS/Android), Samsung Smart devices
  • 6. When should I use it? Why Xamarin when we have Flutter, PhoneGap, Corona, React Native... • All of these are great tools! But… • Your team knows C#/.Net • You need multiple-platform apps • You want a native app performance and/or look & feel
  • 9. History Recap 2011 Founded in 2011 as MonoTouch/Mono For Android 2013 Renamed & integration into Visual Studio / Launch Of Xamarin Studio 2016 Purchased by Microsoft •Full time development / support •Free & 100% open-sourced
  • 10. What Do I need?  PC  Visual Studio 2017 / 2019  Mac  Visual Studio for Mac  Note: iOS development REQUIRES a Mac to build/test
  • 14. Views – Building Block 3 Button Label Entry Switch Activity Indicator
  • 15. Views – Building Block 3 (cont) Views Android iOS Button Label Entry Switch Activity Indicator
  • 16. Views – Building Block 3 (cont)  List View  Table View  Image  Slider  Date Picker  Progress bar  Editor  Map  Web View  Open GL View  Frame  … And more!
  • 17. Cells – Building Block 4  A View Cell (Cell) is a view optimized for data templates  Can use layouts  Great for a reusable template in a List.
  • 18. XAML Introduction  Code time!  Anatomy of a Xamarin.Forms App  Content Page  Views  Styles  Layouts  Stack  Grid  Absolute
  • 19.
  • 20. Databinding  How do we show information to the user?  How do we get user input?  Model-View-ViewModel (MVVM) Basics  View: knows how to display  ViewModel: knows what data to display  Model: the nouns of the system Flexible Layout Standard Controls Navigation Custom Controls Data Binding XAML Styles + Triggers Maps
  • 21. Databinding (cont.) View XF Content Page ViewModel Class Model Class Data Data Events • View: knows how to display data • ViewModel: knows what data to display • Model: the nouns of the system. Data Objects
  • 22. Databinding (cont.)  Code Time!  Bindable Properties  Binding a Context  Converters
  • 23.
  • 24. View Customization  What if Xamarin.Forms doesn’t behave the way I want it to?  Platform Specific Changes  Effects  Behaviors  Custom Renderers
  • 25. View Customization (cont.)  Platform-Specifics  Use functionality that’s only available on a specific platform iOS Android VisualElement.BlurEffect VisualElement.Elevation VisualElement.IsShadowEnabled Button.UseDefaultPadding Entry.AdjustsFontSizeToFitWidth Button.UseDefaultShadow Entry.CursorColor Entry.ImeOptions (set action) ListView.SeparatorStyle ListView.IsFastScrollEnabled NavigationPage.HideNavigationBarSeparator NavigationPage.BarHeight
  • 26. View Customization (cont)  Effects  AKA “Custom Renderers Lite”  Allow the native controls on each platform to be customized  Typically used for small styling changes  Benefits:  Simplify the customization of a control  Are reusable  Can be passed as parameters for increased reuse
  • 27. View Customization (cont.)  Behaviors  Attach additional functionality to any Xamarin.Forms View  Examples  Allow n-characters in an entry  Only allow integers to be entered into an entry
  • 28. View Customization (cont.)  Custom Renderers  Lets developers override the out-of-the-box renderers to customize the appearance/behavior of Xamarin.Forms on each platform  Think “can I do this with an effect?” first  Extend a Xamarin.Forms View  Required when there’s a need to override methods of a platform-specific control.
  • 29. View Customization (cont.)  Code Time!  Platform-specific  Effects  Behaviors  Custom Renderers
  • 30. What to do next?  Try out these device features:  Accelerometer, Barometer, Battery, Compass, Connectivity State, etc  Use plugins  NuGet packages implement and provide a lot of features!  Xamarin.Essentials - a must for an interactive app  Microsoft Learn (or Xamarin University until June 2019)  https://docs.microsoft.com/en- us/learn/browse/?roles=developer&term=xamarin  I recommend all the Xamarin.Forms courses
  • 31. References  Documentation  All available online:  https://docs.microsoft.com/en-us/xamarin/  Slack  Get involved  https://xamarinchat.herokuapp.com/  Learn the hot MVVM frameworks  Prism https://prismlibrary.github.io/  ReactiveUI https://reactiveui.net/  MVVMCross https://www.mvvmcross.com/
  • 32. Resources  Installing Xamarin: https://docs.microsoft.com/en-us/xamarin/get- started/installation/?pivots=windows  Build your first app with Xamarin.Forms: https://www.youtube.com/watch?v=NGvn-pGZFPA  Xamarin.Forms roadmap: https://github.com/xamarin/Xamarin.Forms/wiki/Feature-Roadmap
  • 33.
  • 34. About Me Chester (Chet) Hartin Technical Architect @ Concurrency Focus: C#, APIs, Messaging services, Xamarin. GitHub: https://github.com/chesterhartin Twitter: @ChetHartin