SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
www.xam-consulting.com www.michaelridland.com
10 Awesome Xamarin.Forms

Tips & Tricks
www.xam-consulting.com www.michaelridland.com
Michael Ridland
www.michaelridland.com
www.xam-consulting.com www.michaelridland.com
Xamarin Specialists - We work with Xamarin
all day and night.
www.xam-consulting.com www.michaelridland.com
Developed Apps WITHOUT Xamarin.Forms
www.xam-consulting.com www.michaelridland.com
Developed Apps WITH Xamarin.Forms
www.xam-consulting.com www.michaelridland.com
I hate Xamarin.Forms
because of this, this, this and that
www.xam-consulting.com www.michaelridland.com
OK, Xamarin.Forms is not perfect
but it’s a trade off !
www.xam-consulting.com www.michaelridland.com
The 10 Tips and Tricks
Goal - Get at least 1 tip for everyone in the room!

Goal - Tips for both beginners and gurus
www.xam-consulting.com www.michaelridland.com
Tip #1 - Learn from github seriously
▪Download the apps and run them
▪github.com/conceptdev
▪github.com/xamarin
www.xam-consulting.com www.michaelridland.com
Tip #2 - Use the Source
Xamarin.Forms Source (Can use Assembly browser in XS)
XLabs Source
* The #1 documentation for Custom Renderers & Native Code!
www.xam-consulting.com www.michaelridland.com
Tip #3 - Be Patient
▪ Mobile is hard, expect to encounter issues and
frustrations
▪ Estimate accordingly, if you’re used to estimating
web projects multiple it by 3-5
▪ Xamarin dev is not a walk in the park, but it has
good outcomes, eg Fast Native App
www.xam-consulting.com www.michaelridland.com
Tip #4 - Don’t fight the Framework
▪ ‘I want Cancel here because that’s how I do it in iOS’…
▪ ‘I want swipe cell because that’s how I do it in iOS’…
▪ You can build nice UI’s with Xamarin.Forms but you just
need to be within it’s constraints.
▪ You can change your UI to match what’s ‘In the box’
www.xam-consulting.com www.michaelridland.com
Tip #4 - Don’t fight the Framework
It’s 3-10 times more expensive
but you can still do anything that you can do in Native
Once you break-out (custom renderer)
www.xam-consulting.com www.michaelridland.com
Tip #5 - Grid can be Awesome
▪ Not difficult to use (nearly as easy as
StackLayout)
▪ Works well with XAML (unlike relative)
▪ Faster than StackLayout
▪ Can be used to create overlays/
advanced UIs
www.xam-consulting.com www.michaelridland.com
Tip #6 - ListView Performance Tips
▪ Step 1 - Use CS over XAML
▪ Step 2 - Use Grid/Absolute Layout
▪ Step 3 - Try FastCell Implementation (link?)
▪ Step 4 - Create a Custom Native Cell
▪ Step 5 - Any tips from the crowd?
www.xam-consulting.com www.michaelridland.com
Tip #7 - TaskCompletionSource
▪ Many NativeAPIs are based on events/callbacks
▪ Use TaskCompletionSource to support async
▪ http://www.michaelridland.com/xamarin/
taskcompletionsource-xamarin-beautiful-async/
www.xam-consulting.com www.michaelridland.com
Tip #7 - TaskCompletionSource
www.xam-consulting.com www.michaelridland.com
Tip #8 - Bindable Property Template
www.xam-consulting.com www.michaelridland.com
Tip #9 - Forms->Native->Forms - The Xamarin.Forms Holy Grail
▪Take a Xamarin.Forms Views and Convert into
a Native View to use
▪Great for using with Custom Renderers
▪Great for using with Native Components
▪Demo!
www.xam-consulting.com www.michaelridland.com
Tip #10 - Add Xamarin.Forms to your MvvmCross App
▪ https://github.com/rid00z/
MvvmCrossNavigationDemo
▪ Perfect if you already have a MvvmCross
application and would like a few Xamarin.Form
pages
▪ Demo!
www.xam-consulting.com www.michaelridland.com
Bonus Tip - MessagingCentreitis Anti-Pattern
•MessageCentre is Great!
•Use it and love it
•But don’t overdo it
www.xam-consulting.com www.michaelridland.com
Bonus Tip - App Statics Anti-Pattern
• Using global statics for Navigation in your App
• It’s a recipe for a big ball of mud
• It’s easy to begin with - but in the end all your code becomes tightly
coupled
Bad - Don’t do this!
www.xam-consulting.com www.michaelridland.com
Bonus Tip - App Statics Anti-Pattern
• The solution! - Use a MvvmFramework with a Navigation Service
Good - Do this!
www.xam-consulting.com www.michaelridland.com
Bonus Tip - Run Sync
• Once in a while you might need to run a async function
synchronously. (For a Native API/Component)
www.xam-consulting.com www.michaelridland.com
www.xam-consulting.com www.michaelridland.com
Bonus Tip - Easy dialogs with Acr-Userdialogs
Easily add Alerts/Prompts/Loading Dialogs using Acr
UserDialogs (https://github.com/aritchie/acr-xamarin-
forms)
- It’s in nuget
www.xam-consulting.com www.michaelridland.com
All Code and Links will be put into a Blog post on
www.michaelridland.com
If you want it today please ask me for it!
www.xam-consulting.com www.michaelridland.com
Q & A
Michael Ridland
michael@xam-consulting.com
www.michaelridland.com

Mais conteúdo relacionado

Mais procurados

Heroku - Forget Servers!!
Heroku - Forget Servers!!Heroku - Forget Servers!!
Heroku - Forget Servers!!
Ayumu Aizawa
 

Mais procurados (15)

Making Money Using WordPress
Making Money Using WordPressMaking Money Using WordPress
Making Money Using WordPress
 
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 - 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
 
Bridging the Gap: From WordPress beginner to WordPress Wizard
Bridging the Gap: From WordPress beginner to WordPress WizardBridging the Gap: From WordPress beginner to WordPress Wizard
Bridging the Gap: From WordPress beginner to WordPress Wizard
 
extending-and-optimizing-xamarin-forms-apps
extending-and-optimizing-xamarin-forms-appsextending-and-optimizing-xamarin-forms-apps
extending-and-optimizing-xamarin-forms-apps
 
Confusion In The Land Of The Serverless - 90min Version
Confusion In The Land Of The Serverless - 90min VersionConfusion In The Land Of The Serverless - 90min Version
Confusion In The Land Of The Serverless - 90min Version
 
Webinar: Myths, Mistakes and Management of WooCommerce at Scale
Webinar: Myths, Mistakes and Management of WooCommerce at ScaleWebinar: Myths, Mistakes and Management of WooCommerce at Scale
Webinar: Myths, Mistakes and Management of WooCommerce at Scale
 
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
 
Webinar: You Are Too Cheap!
Webinar: You Are Too Cheap! Webinar: You Are Too Cheap!
Webinar: You Are Too Cheap!
 
Heroku - Forget Servers!!
Heroku - Forget Servers!!Heroku - Forget Servers!!
Heroku - Forget Servers!!
 
Managing multitudes of media
Managing multitudes of mediaManaging multitudes of media
Managing multitudes of media
 
Digitizing your Biz
Digitizing your BizDigitizing your Biz
Digitizing your Biz
 
front end workshop v3
front end workshop v3front end workshop v3
front end workshop v3
 
Building An Accessible Site from the Ground Up
Building An Accessible Site from the Ground UpBuilding An Accessible Site from the Ground Up
Building An Accessible Site from the Ground Up
 
Agile BDD
Agile BDDAgile BDD
Agile BDD
 

Semelhante a 10 Awesome Xamarin.Forms Tips & Tricks

Building Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with DrupalBuilding Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with Drupal
Four Kitchens
 
Rank above smx israel 2013 - schema & rich snippets
Rank above   smx israel 2013 - schema & rich snippetsRank above   smx israel 2013 - schema & rich snippets
Rank above smx israel 2013 - schema & rich snippets
Barry Schwartz
 

Semelhante a 10 Awesome Xamarin.Forms Tips & Tricks (20)

Introduction to Xamarin
Introduction to XamarinIntroduction to Xamarin
Introduction to Xamarin
 
Xamarin.iOS Presentation
Xamarin.iOS PresentationXamarin.iOS Presentation
Xamarin.iOS Presentation
 
What Technology Can Do For You - The Nonprofit Edition
What Technology Can Do For You - The Nonprofit EditionWhat Technology Can Do For You - The Nonprofit Edition
What Technology Can Do For You - The Nonprofit Edition
 
Compiled Xaml Performance in Xamarin.Forms
Compiled Xaml Performance in Xamarin.FormsCompiled Xaml Performance in Xamarin.Forms
Compiled Xaml Performance in Xamarin.Forms
 
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
 
Top 10 Graphic Design Mistakes - Part 4
Top 10 Graphic Design Mistakes - Part 4Top 10 Graphic Design Mistakes - Part 4
Top 10 Graphic Design Mistakes - Part 4
 
"Crap to Gold" by Kamran shafi
"Crap to Gold" by Kamran shafi"Crap to Gold" by Kamran shafi
"Crap to Gold" by Kamran shafi
 
MVVM frameworks - MvvmCross
MVVM frameworks - MvvmCrossMVVM frameworks - MvvmCross
MVVM frameworks - MvvmCross
 
Building Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with DrupalBuilding Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with Drupal
 
GFAR webinar "The future of online media" - webdesign trends
GFAR webinar "The future of online media" - webdesign trendsGFAR webinar "The future of online media" - webdesign trends
GFAR webinar "The future of online media" - webdesign trends
 
Responsive Design: Out of the Box and Down the Rabbit Hole
Responsive Design: Out of the Box and Down the Rabbit HoleResponsive Design: Out of the Box and Down the Rabbit Hole
Responsive Design: Out of the Box and Down the Rabbit Hole
 
Rank above smx israel 2013 - schema & rich snippets
Rank above   smx israel 2013 - schema & rich snippetsRank above   smx israel 2013 - schema & rich snippets
Rank above smx israel 2013 - schema & rich snippets
 
RankAbove - SMX Israel 2013 - Schema & Rich Snippets
RankAbove - SMX Israel 2013 - Schema & Rich SnippetsRankAbove - SMX Israel 2013 - Schema & Rich Snippets
RankAbove - SMX Israel 2013 - Schema & Rich Snippets
 
Building Advanced Squarespace Websites
Building Advanced Squarespace WebsitesBuilding Advanced Squarespace Websites
Building Advanced Squarespace Websites
 
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
 
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
 
Magento 2 Front-end performance tips & tricks - Nomadmage September 2017
Magento 2 Front-end performance tips & tricks - Nomadmage September 2017Magento 2 Front-end performance tips & tricks - Nomadmage September 2017
Magento 2 Front-end performance tips & tricks - Nomadmage September 2017
 
ICONUK 2014 - From Idea To App
ICONUK 2014 - From Idea To AppICONUK 2014 - From Idea To App
ICONUK 2014 - From Idea To App
 
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
 
Kickstart android development with xamarin
Kickstart android development with xamarinKickstart android development with xamarin
Kickstart android development with xamarin
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

10 Awesome Xamarin.Forms Tips & Tricks