Several topics will be covered in this intro presentation including: How to create a Xamarin Forms solution, as well as emulator tips, navigation, images, event handlers, device form factors and list views. The end result will be a typical app with a Main navigation page, a list view page and a detail page that you can use as a template for building future apps!
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Introduction to Xamarin Forms
1.
2. about the instructor
Russ Fustino
http://www.fustinobrothers.com
Twitter: @RussFustino
Russ@FustinoBrothers.com
Algorand Technical Evangelist
Russ Fustino, Microsoft MVP 2013-2018
CEO Fustino Brothers, Inc
Former Developer Evangelist for Microsoft,
Xamarin, Raygun, Wowza, ComponentOne and
OutSystems
Publisher of Several Windows, iOS & Android Apps
Publisher of Jethro Tull App, Endorsed
Book author – Azure and Xamarin Forms
4. App Studio Version released
5www.FustinoBrothers.com | @FustinoBrothers
FBI: 850.366.3232 | Fax: 1.856.267.1568
5. What were the Challenges?
• How to navigate in App?
• Images in iOS and Android
• Background Image on ContentPage was stretched on Android
• Xamarin Forms WebView Control did not have a enable
JavaScript property
• File IO was in a different project location for each platform
• How to leverage XAML:
• Phone vs Tablet
• Portrait vs Landscape
• I need components … third party controls … Grid Layout
ListView.
6. Xamarin Forms:
• Navigation
• Images
• Custom Renderers
• Embedded Resources
• XAML, Building for Phone and Tablet
• Third party controls and plugins
• Dependency Injection
Submission Challenges
Create a Xamarin Forms App
agenda
14. A View is the base class for all visual controls, most
standard controls are present
15.
16. • Android version choked using image cell and large
images for thumbnails
• Use Aspect=AspectFit, AspectFill or Fill property on
Image control
• Use small images for Thumbnails - Discography, ListView
was dying in Android
• Expand Java Heap to 1G in Android project settings
• Thin out all images (save as web)
• Make all images .PNG because they are optimized in iOS
17.
18. • Make as many images as embedded as you can
• Images will display quicker
• Downside: May make the app too big
• Anything over 50 Meg for Android on Google Play, needs expansion
files for submission
• Anything over 100 Meg for iOS will not install over Cellular, just Wi-Fi
• We ended up moving most of the images to a server for the
Discography Details. This got the app down to around 25 meg
for Android and 50 meg for iOS.
19. • Custom renderers extend the control to platform specific use
• isScriptable property is not exposed in XF WebView control
https://developer.xamarin.com/guides/xamarin-forms/custom-
renderer/
20. • This link was our saving grace for the stretched and tiled
background image problems we were seeing.
http://java.dzone.com/articles/using-full-size-none-stretched
21. • Tablet and Phone view in the same set of XAML
• Cannot have more than one root for a context page
• StackPanels within a StackPanel or Grid is fine, you just cant
have multiple root views
27. • Android Google Play – Need to use Android in app
purchase process for payments
• Amazon Store – Need to provide proof we had the rights
to use “Jethro Tull” as the name of the app.
• iOS App Store – We had to remove all competitive
platforms for Music. Only iTunes is available. Had to
remove Xbox, Google Play, Amazon Music.
• App Store – We had to remove use of Apple Logo and
iTunes Logo as part of our design
• iOS approval is slow 7-10 days!
41. Used to create rows and columns of information,
children identify specific column, row and span
42.
43.
44.
45. Solution to Xamarin Intro Chapter
Code at:
https://github.com/apress/azure-and-xamarin-forms
46. Xamarin Forms:
• Navigation
• Images
• Custom Renderers
• Embedded Resources
• XAML, Building for Phone and Tablet
• Third party controls and plugins
• Dependency Injection
Submission Challenges
Creating your first app
summary