All Projects → danhermes → xamarin-book-examples

danhermes / xamarin-book-examples

Licence: other
Xamarin Mobile Application Development - Book Examples

Programming Languages

C#
18002 projects
smalltalk
420 projects

Xamarin Mobile Application Development

cover The xamarin-book-examples GitHub project contains the complete code examples for the book entitled Xamarin Mobile Application Development by Dan Hermes, published by Apress. This book is a four hundred page journey through Xamarin.Forms, Xamarin.iOS, and Xamarin.Android, covering the entire breadth of the Xamarin platform. These 200+ code examples are freely downloadable and include both C# and XAML.

This weighty book gives clear guidance that will help you build quality apps, starting with architectural considerations, and then jumping into practical code strategies. - Bryan Costanich, Vice President, Xamarin


Many thanks to Xamarin MVP Jason Awbrey and Alex Blount (now a developer at Xamarin) for their XAML contributions. Ten thousand thanks to Xamarin MVP Ed Snider for his tech review of much of this code!

The book that goes with this code, Xamarin Mobile Application Development, is available at Amazon.com here.

What's In Here?

The book covers both Xamarin.Forms and platform-specific techniques using Xamarin.iOS and Xamarin.Android so this code repository contains solutions for all three of those approaches in C# as well as in the equivalent XAML. (Note: In the book itself there is only C#, no XAML.) Chapter 2 starts with an intro example for just Xamarin.Forms, but Chapters 3-6 (the UI chapters) each contain four solution folders:

  • Xamarin.Forms XAML
  • Xamarin.Forms C#
  • Xamarin.Android
  • Xamarin.iOS
For example, in chapter 3, the layout chapter, the solution folders look like this:
  • LayoutExample.Xaml         <- This solution contains the Xamarin.Forms XAML examples.
  • LayoutExample                  <- This solution has the Xamarin.Forms C# examples.
  • LayoutExampleAndroid     <- Here is the Xamarin.Android solution.
  • LayoutExampleiOS            <- And the Xamarin.iOS solution.
The first two solutions are for cross-platform Xamarin.Forms apps (Android, iOS, Windows Phone), and the second two solutions contain platform-specific code for Android and iOS only - in every chapter. In other words, whether you're coding Xamarin.Forms C#, Xamarin.Forms XAML, Xamarin.Android, or Xamarin.iOS: it's all here.

What Are These Chapters About?

Here is the chapter content: (no code examples in Chapter 1)

Chapter 2 - Building Mobile User Interfaces
A Xamarin.Forms primer and a comparison of Xamarin.Forms vs. Platform-specific approaches such as Xamarin.iOS and Xamarin.Android. Covers Xamarin.Forms Pages, Layouts, and Views.

Chapter 3 - UI Design Using Layouts
Layouts help us organize the positioning and formatting of controls, allowing us to structure and design the screens of our mobile app.

Chapter 4 - User Interaction Using Controls
Pickers, sliders, switches, and other mobile UI controls facilitate user interaction and data entry that is unique to the mobile user interface and differs from the PC/mouse interface, largely because of the use of gestures.

Chapter 5 - Making a Scrollable List
Lists are one of the most powerful methods of data display and selection in mobile apps.

Chapter 6 - Navigation
Navigation lets a user traverse an app, move from screen to screen, and access features. Hierarchical, modal, navigation drawers, drill-down lists, and other key patterns make up the core of mobile UI navigation. State management is the handling of data passed between screens as the user navigates through the app.

Chapter 7 - Data Access and Data Binding
SQLite is the database of choice for many Xamarin developers. Store and retrieve data locally by using SQLite.NET or ADO.NET. Using Xamarin.Forms data binding, fuse UI elements to your data models. Use the MVVM pattern by binding to a view model.

Chapter 8 - Custom Renderers
Extend the stock Xamarin.Forms controls and take advantage of platform-specific UI feature sets while maintaining a cross-platform approach using custom renderers.

Chapter 9 - Cross-platform Architecture
Architect your cross-platform application by managing platform-specific code. Project-level options in Xamarin include Portable Class Libraries (PCLs) and shared projects. Cross-platform coding techniques include conditional compilation, dependency injection (DI), and file linking.

What Is the Book About?


Xamarin Mobile Application Development is a hands-on Xamarin.Forms primer and a cross-platform reference for building native Android, iOS, and Windows Phone apps using C# and .NET. This book explains how to use Xamarin.Forms, Xamarin.Android, and Xamarin.iOS to build business apps for your customers and consumer apps for Google Play and the iTunes App Store.

Learn how to leverage Xamarin.Forms to optimize cross-platform development using the most common UI pages, layouts, views, controls, and UI patterns. Combine these with platform-specific UI to craft a visually stunning and highly interactive mobile user experience.

Explore solution-building techniques from starter-to-enterprise to help you decouple your functional layers, manage your platform-specific code, and share your cross-platform classes for code reuse, testability, and maintainability.

This comprehensive recipe and reference book, featuring over 200 C# code examples with downloadable C# and XAML, addresses one of the most important and vexing problems in the software industry today: How do we effectively design and develop cross-platform mobile applications?

What you’ll learn:
  • How to build world-class mobile apps for iOS, Android, and Windows Phone using C#
  • How to organize your Xamarin code into a professional-grade application architecture
  • The latest Xamarin techniques for cross-platform UI using Xamarin.Forms
  • When and how to use platform-specific UI
  • Data binding, local data access, enterprise cloud data solutions, and building a data access layer for mobile apps
  • Cross-platform architecture and design to maximize portability and code reuse
This is book is for C# and ASP.NET developers, architects, and technical managers as well as many Android and iOS developers.

The book that goes with this code, Xamarin Mobile Application Development, is available at Amazon.com here.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].