x a m a r i n f o r m s f o r b e g i n n e r s a b o u t
play

X A M A R I N . F O R M S F O R B E G I N N E R S A B O U T M E - PowerPoint PPT Presentation

X A M A R I N . F O R M S F O R B E G I N N E R S A B O U T M E Tom Soderling Sr. Mobile Apps Developer @ Polaris Industries; Ride Command Xamarin.Forms enthusiast DevOps hobbyist & machine learning beginner 4 year XCMD Blog:


  1. X A M A R I N . F O R M S F O R B E G I N N E R S

  2. A B O U T M E Tom Soderling Sr. Mobile Apps Developer @ Polaris Industries; Ride Command Xamarin.Forms enthusiast DevOps hobbyist & machine learning beginner 4 year XCMD Blog: https://tomsoderling.github.io GitHub: https://github.com/TomSoderling Twitter: @tomsoderling How Deep Pickster Spaniel Is It?

  3. T H E P L A N • Introduction: Why, What, and When • Overview of Xamarin.Forms Building Blocks • Building a Xamarin.Forms UI in XAML • Data Binding • View Customization • Next Steps & Resources • Please ask any questions that come up!

  4. T H E P L A N • Introduction: Why, What, and When • Overview of Xamarin.Forms Building Blocks • Building a Xamarin.Forms UI in XAML • Data Binding • View Customization • Next Steps & Resources

  5. I N T R O D U C T I O N : W H Y • WET: the soggy state of mobile app development • W rite E verything T wice

  6. I N T R O D U C T I O N : W H Y • WET: the soggy state of mobile app development • W rite E verything T wice

  7. I N T R O D U C T I O N : W H AT • What is Xamarin.Forms? • Cross-platform UI framework • Platforms: • Mobile: iOS 8 and up, Android 4.0.3 (API 15) • Desktop: Windows 10 UWP , MacOS, WFP • Samsung Smart Devices: Tizen

  8. I N T R O D U C T I O N : W H AT • Brief History: • May 2011, Xamarin founded • MonoTouch and Mono for Android using MonoDevelop IDE • February 2013, release of Xamarin 2.0 • Xamarin Studio IDE & integration with Visual Studio • Renamed to Xamarin.Android and Xamarin.iOS • May 2014, Xamarin.Forms released as part of Xamarin 3 • February 24 2016, Xamarin acquired by Microsoft • Owned, actively developed on, and supported by Microsoft • Free and completely open-source on GitHub

  9. I N T R O D U C T I O N : W H AT • Develop on Mac or Windows • Visual Studio on Windows (2015 or 2017) • Visual Studio for Mac • iOS development requires a Mac to build (somewhere) • Xamarin Mac Agent

  10. I N T R O D U C T I O N : W H E N • When should I use Xamarin.Forms? • You or your team knows C# and .NET • You need apps for multiple-platforms • You want native app performance and/or look and feel • You’re okay knowing that there are cheaper ways to make an app

  11. T H E P L A N • Introduction: Why, What, and When • Overview of Xamarin.Forms Building Blocks • Building a Xamarin.Forms UI in XAML • Data Binding • View Customization • Next Steps & Resources

  12. O V E R V I E W O F X A M A R I N . F O R M S B U I L D I N G B L O C K S • Pages • Layouts • Views • Cells

  13. O V E R V I E W O F X F B U I L D I N G B L O C K S • Pages

  14. O V E R V I E W O F X F B U I L D I N G B L O C K S • Views • Button • Label • Entry • Switch • ActivityIndicator

  15. O V E R V I E W O F X F B U I L D I N G B L O C K S • Views Android iOS • Button • Label • Entry • Switch • ActivityIndicator

  16. O V E R V I E W O F X F B U I L D I N G B L O C K S • Views Android iOS • Button • Label • Entry • Switch • ActivityIndicator

  17. O V E R V I E W O F X F B U I L D I N G B L O C K S • Views Android iOS • Button • Label • Entry • Switch • ActivityIndicator

  18. O V E R V I E W O F X F B U I L D I N G B L O C K S • Views Android iOS • Button • Label • Entry • Switch • ActivityIndicator

  19. O V E R V I E W O F X F B U I L D I N G B L O C K S • Views Android iOS • Button • Label • Entry • Switch • ActivityIndicator

  20. O V E R V I E W O F X F B U I L D I N G B L O C K S • Views • ListView • ProgressBar • TableView • SearchBar • Image • Map • Slider • WebView • Picker • OpenGLView • DatePicker • Frame • Editor • BoxView

  21. O V E R V I E W O F X F B U I L D I N G B L O C K S • Layouts

  22. T H E P L A N • Introduction: Why, What, and When • Overview of Xamarin.Forms Building Blocks • Building a Xamarin.Forms UI in XAML • Data Binding • View Customization • Next Steps & Resources

  23. B U I L D I N G A X A M A R I N . F O R M S U I I N X A M L • Let’s look at some code! • Anatomy of a Xamarin.Forms app • ContentPage • Views • Layouts • StackLayout • Grid • AbsoluteLayout

  24. T H E P L A N • Introduction: Why, What, and When • Overview of Xamarin.Forms Building Blocks • Building a Xamarin.Forms UI in XAML • Data Binding • View Customization • Next Steps & Resources

  25. D ATA B I N D I N G

  26. D ATA B I N D I N G • Some basics of Model-View-ViewModel architecture (MVVM) • View : knows how to display data View 
 XF Content Page

  27. D ATA B I N D I N G • Some basics of Model-View-ViewModel architecture (MVVM) • View : knows how to display data • ViewModel : knows what data to display Data ViewModel 
 View 
 Regular Class XF Content Page Events

  28. D ATA B I N D I N G • Some basics of Model-View-ViewModel architecture (MVVM) • View : knows how to display data • ViewModel : knows what data to display • Model : The nouns of the system. Data objects Data Data ViewModel 
 Model 
 View 
 Regular Class Regular Class XF Content Page Events

  29. D ATA B I N D I N G • Some basics of Model-View-ViewModel architecture (MVVM) • View : knows how to display data • ViewModel : knows what data to display • Model : The nouns of the system. Data objects Data Data ViewModel 
 Model 
 View 
 Regular Class Regular Class XF Content Page Events

  30. D ATA B I N D I N G • Let’s look at some code! • Bindable Properties • Binding Context • Converters

  31. T H E P L A N • Introduction: Why, What, and When • Overview of Xamarin.Forms Building Blocks • Building a Xamarin.Forms UI in XAML • Data Binding • View Customization • Next Steps & Resources

  32. V I E W C U S T O M I Z AT I O N • What if a Xamarin.Forms View doesn’t look or behave how I want? • Platform-Specifics • Effects • Behaviors • Custom Renderers

  33. V I E W C U S T O M I Z AT I O N • Platform-Specifics • Use functionality that's only available on a specific platform. • Some examples: iOS Android VisualElement.BlurEffect VisualElement.Elevation VisualElement.IsShadowEnabled Button.UseDefaultPadding Entry.AdjustsFontSizeToFitWidth Button.UseDefaultShadow Entry.CursorColor Entry.ImeOptions (set user action button) ListView.SeparatorStyle ListView.IsFastScrollEnabled NavigationPage.HideNavigationBarSeparator NavigationPage.BarHeight

  34. V I E W C U S T O M I Z AT I O N • Effects • 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 parameters to further increase reuse

  35. V I E W C U S T O M I Z AT I O N • Behaviors • Attach additional functionality to any Xamarin.Forms View • Examples: • Only allow X number of characters to be entered into an Entry • Only allow integers to be entered into an Entry

  36. V I E W C U S T O M I Z AT I O N • Custom Renderers • Let developers override the out-of-the-box renderers to customize the appearance and behavior of Xamarin.Forms controls 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 custom renderer out of the box

  37. T H E P L A N • Introduction: Why, What, and When • Overview of Xamarin.Forms Building Blocks • Building a Xamarin.Forms UI in XAML • Data Binding • View Customization • Next Steps & Resources

  38. N E X T S T E P S • Using mobile device hardware features • Accelerometer, Barometer, Battery, Compass, Connectivity state, Device Display Information, GPS, Gyroscope, Magnetometer, Phone Dialer, Power, Secure Storage, Text-to-Speech, Vibrate, many more! • Using Plugins • NuGet packages that implement the platform features and provide an API for developers to use from shared code! • Xamarin.Essentials: a kit of essential API's for your apps (in preview)

  39. N E X T S T E P S Xamarin University New 
 FREE Aug 28, 2017 Unlimited training Live classes via Go to Meeting 1-on-1 office hours

  40. N E X T S T E P S • Documentation • All Xamarin documentation has moved to Microsoft Docs. Very well done • https://docs.microsoft.com/en-us/xamarin • Xamarin Slack Channel • https://xamarinchat.herokuapp.com • Look into using the MVVM pattern and a good framework • Help you build loosely coupled, maintainable, and testable apps • Prism MVVM Library (many others out there) • http://prismlibrary.github.io

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend