SlideShare a Scribd company logo
1 of 28
Download to read 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

More Related Content

What's hot

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

What's hot (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
 

Similar to 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
 

Similar to 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
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

10 Awesome Xamarin.Forms Tips & Tricks