๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Mastering Xamarin UI Development: Build robust and a maintainable cross-platform mobile UI with Xamarin and C# 7, 2nd Edition

โœ Scribed by Steven F. Daniel


Publisher
Packt Publishing
Year
2018
Tongue
English
Leaves
577
Edition
2
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Learn how to build stunning, maintainable, cross-platform mobile application user interfaces using C# 7 with the power of both the Xamarin and Xamarin.Forms frameworks.
Key Features

  • Build effective native and cross-platform user interfaces using the Xamarin frameworks for iOS and Android, as well as Xamarin.Forms
  • Maximize the testability, flexibility, and overall quality of your Xamarin mobile apps
  • Step-by-Steps guide that is packed with real-world scenarios and solutions, to build professional grade mobile apps and games for the iOS and Android platforms, using C# 7
Book Description This book will provide you with the knowledge and practical skills that are required to develop real-world Xamarin and Xamarin.Forms applications. You'll learn how to create native Android app that will interact with the device camera and photo gallery, and then create a native iOS sliding tiles game. You will learn how to implement complex UI layouts and create customizable control elements based on the platform, using XAML and C# 7 code to interact with control elements within your XAML ContentPages.
You'll learn how to add location-based features by to your apps by creating a LocationService class and using the Xam.Plugin.Geolocator cross-platform library, that will be used to obtain the current device location. Next, you'll learn how to work with and implement animations and visual effects within your UI using the PlatformEffects API, using C# code.
At the end of this book, you'll learn how to integrate Microsoft Azure App Services and use the Twitter APIs within your app. You will work with the Razor Templating Engine to build a book library HTML5 solution that will use a SQLite.net library to store, update, retrieve, and delete information within a local SQLite database. Finally, you will learn how to write unit tests using the NUnit and UITest frameworks.
What you will learn
  • Downloading and Installing the Visual Studio for Mac IDE
  • Overview and Understanding of the Xamarin Mobile Platform
  • Understand the MVVM architectural pattern and how to implement this with your apps
  • Build a NavigationService class to enable navigation between your ViewModels
  • Implement Data-Binding to control elements within your XAML pages and ViewModels
  • Create and Implement Xamarin.Forms Animations within your applications
  • Work with the Microsoft Azure App Services Platform and the Twitter API
Who this book is for This book is intended for readers who have experience using at least the C# 6.0 programming language and interested in learning how to create stunning native, and cross-platform user interfaces for the iOS and Android platforms using the Xamarin and Xamarin.Forms frameworks using C# 7.
Table of Contents
  1. Setting up Visual Studio for Mac
  2. Building a Photo Library app using Xamarin.Android and C#
  3. Building a Picture Sliding Game using Xamarin.iOS and C#
  4. Creating the TrackMyWalks Native App
  5. MVVM and Data Binding
  6. Navigating within the MVVM Model - The Xamarin.Forms Way
  7. Adding Location-Based Features within Your App
  8. Customizing the User Interface
  9. Working with Animations in Xamarin.Forms
  10. Working with the Razor Templating Engine
  11. Incorporating API Data Access using Microsoft Azure App Services
  12. Making our App Social - Using the Twitter API
  13. Unit Testing your Xamarin.Forms App using the NUnit and UITest Frameworks

โœฆ Table of Contents


Cover
Title Page
Copyright and Credits
Dedication
www.PacktPub.com
Contributors
Acknowledgments
Table of Contents
Preface
Chapter 1: Setting Up Visual Studio for Mac
Downloading and installing Visual Studio for Mac
Installing Visual Studio for Mac and Xamarin
Exploring the Microsoft Visual Studio for Mac IDE
Configuring and including additional .NET Runtimes
Defining your Android and iOS SDK locations
Understanding the Xamarin mobile platform
Benefits of developing apps using the Xamarin mobile platform
Developing native apps using the Xamarin approach
Developing apps using the Xamarin.Forms approach
Creating a Xamarin project for both iOS and Android
Creating the user interface for our Planetary app using XAML
Displaying a list of planet names using C#
Launching the Planetary app using the iOS simulator
Using and setting Breakpoints in your code
Setting a Breakpoint in your Planetary App solution
Using the Breakpoints Pad to view Breakpoints that have been set
Creating conditional Breakpoints to perform an action
Using the Visual Studio for Mac built-in debugger
Overview of the Visual Studio for Mac debugger
Using the debugger to step through your code
Using the Immediate window to print code variable contents
Summary
Chapter 2: Building a PhotoLibrary App Using Android
Creating a native Android app using Visual Studio for Mac
Adding the Xamarin Media Plugin NuGet package to our solution
Creating the user interface for our PhotoLibrary app using XML
Updating the Strings XML file to include our UI control values
Creating the Styles XML file for our Photo Library app
Creating and implementing the PhotoLibrary Activity class
Updating the MainActivity class to call the PhotoLibrary Activity
Implementing Material Design in the PhotoLibrary app
Creating custom themes for the PhotoLibrary application
Creating custom styles for the Photo Library application UI controls
Applying the custom theme to the PhotoLibrary application
Setting up camera and photo album permissions
Interacting with the device camera and photo album
Launching the Photo Library app using the Android emulator
Summary
Chapter 3: Building a SlidingTiles Game Using Xamarin.iOS
Creating a native iOS app using Visual Studio for Mac
Creating the SlidingTiles user interface using Storyboards
Adding a label to our ViewController in the Storyboard
Adding a View to our View Controller in the Storyboard
Adding a reset button to our View Controller in the Storyboard
Adding the Shuffle Button to our View Controller in the Storyboard
Adding the GameTile image to our SlidingTiles game
Implementing the game logic for our SlidingTiles Game
Creating and implementing the GameTile Interface class
Creating and implementing the GameTile class
Updating the ViewController class to implement our class methods
Creating and implementing the CreateGameBoard method
Creating and implementing the ResetGame_Clicked method
Randomly shuffling our Game Tiles on the Game Board
Implementing the StartNewGame Instance method
Handling touch events in the Game Board user interface
Working with and applying animations to your app
Creating and implementing animations for the SlidingTiles game
Launching the SlidingTiles game using the iOS simulator
Summary
Chapter 4: Creating the TrackMyWalks Native App
Creating the TrackMyWalks project solution
Updating the NuGet packages within our solution
Creating and implementing our data model
Creating the WalksMainPage interface using XAML
Implementing the WalksMainPage code using C#
Creating the WalkEntryPage interface using XAML
Implementing the WalkEntryPage code using C#
Creating the WalkTrailInfoPage interface using XAML
Implementing the WalkTrailInfoPage code using C#
Integrating and implementing maps within your app
Creating the WalkDistancePage interface using XAML
Implementing the WalkDistancePage code using C#
Updating the TrackMyWalks.iOS AppDelegate
Updating the TrackMyWalks.Android MainActivity
Creating the SplashPage interface using XAML
Implementing the SplashPage code using C#
Updating the App.xaml class to target various platforms
Launching TrackMyWalks using the iOS simulator
Summary
Chapter 5: MVVM and Data Binding
Understanding the MVVM architectural pattern
Creating and implementing the BaseViewModel
Creating the WalksMainPageViewModel using C#
Updating the WalksMainPage user interface using XAML
Updating the WalksMainPage code-behind using C#
Creating the WalkEntryPageViewModel using C#
Updating the WalkEntryPage user interface using XAML
Updating the WalkEntryPage code-behind using C#
Creating the WalkTrailInfoPageViewModel using C#
Updating the WalkTrailInfoPage user interface using XAML
Updating the WalkTrailInfoPage code-behind using C#
Creating the WalkDistancePageViewModel using C#
Updating the WalkDistancePage user interface using XAML
Updating the WalkDistancePage code-behind using C#
Launching the TrackMyWalks app using the iOS simulator
Summary
Chapter 6: Navigating Within the Mvvm Model
Understanding the Xamarin.Forms Navigation API
Differences between the Navigation and ViewModel approaches
Creating and implementing the NavigationService interface
Creating and implementing the NavigationService class
Updating the BaseViewModel to use the navigation service
Updating the WalksMainPageViewModel using C#
Updating the WalksMainPage code-behind using C#
Updating the WalkEntryPageViewModel using C#
Updating the WalkEntryPage code-behind using C#
Updating the WalkTrailInfoPageViewModel using C#
Updating the WalkTrailInfoPage code-behind using C#
Updating the WalkDistancePageViewModel using C#
Updating the WalkDistancePage code-behind using C#
Updating the SplashPage code-behind using C#
Updating the App.xaml class to use the navigation service
Summary
Chapter 7: Adding Location-based Features Within Your App
Creating and using platform-specific services within your app
Adding the plugin geolocator NuGet package to our solution
Creating and implementing the ILocationService interface
Creating and implementing the LocationService class
Updating the WalkEntryPageViewModel using C#
Updating the WalkDistancePageViewModel using C#
Creating the CustomMapOverlay class using C#
Updating the WalkDistancePage user interface using XAML
Updating the WalkDistancePage code-behind using C#
Creating and implementing the CustomMapRenderer (iOS)
Creating and implementing the CustomMapRenderer (Android)
Enabling background location updates and permissions
Launching the TrackMyWalks app using the iOS simulator
Summary
Chapter 8: Customizing the User Interface
Customizing the DataTemplate in the WalksMainPage
Applying padding and margins to XAML layouts
Updating the WalksMainPage user interface using XAML
Updating the WalkEntryPage user interface using XAML
Updating the WalkTrailInfoPage user interface using XAML
Creating and implementing Styles in your App
Creating and implementing Global Styles using XAML
Updating our WalksMainPage to use the Device Style
Updating our WalkTrailInfoPage to use Explicit and Global Styles
Updating our WalksEntryPage to use our Implicit Style
Creating and using PlatformEffects in your app
Creating and Implementing the ButtonShadowEffect (iOS)
Creating and implementing the LabelShadowEffect (iOS)
Creating and implementing the ButtonShadowEffect (Android)
Creating and implementing the LabelShadowEffect (Android)
Implementing the ButtonShadowEffect RoutingEffect class
Implementing the LabelShadowEffect RoutingEffect class
Updating the WalksMainPage to use the LabelShadowEffect
Updating the WalkTrailInfoPage to use the LabelShadowEffect
Updating the WalkTrailInfoPage to use the ButtonShadowEffect
Creating and implementing ValueConverters in your app
Updating the BaseViewModel class to include additional properties
Updating the WalksMainPageViewModel to use our property
Updating the WalksMainPage to use our ImageConverter class
Updating the WalkEntryPage to use our ImageConverter class
Updating the WalkTrailInfoPage to use our ImageConverter class
Launching the TrackMyWalks app using the iOS simulator
Summary
Chapter 9: Working with Animations in Xamarin.Forms
Creating and using Simple Animations in Xamarin.Forms
Updating the WalkEntryPage to use Simple Animations
Updating the WalkTrailInfoPage to use Simple Animations
Creating and using Easing Functions in Xamarin.Forms
Updating the WalkTrailInfoPage to use Easing Functions
Creating and implementing your own Custom Animations
Updating our WalkTrailInfoPage to use Custom Animations
Updating our WalksMainPage to use Custom Animations
Creating and implementing Entrance Animations
Updating the WalkTrailInfoPage to use Entrance Animations
Updating our WalksMainPage to use Entrance Animations
Updating our WalkEntryPage to use Entrance Animations
Launching the TrackMyWalks app using the iOS simulator
Summary
Chapter 10: Working with the Razor Templating Engine
Understanding the Razor templating engine
Building a BookLibrary app using the Razor templating engine
Adding the SQLite-net NuGet package to our solution
Creating and implementing the BookLibrary data model
Creating and implementing the BookDatabase interface
Creating and implementing the BookDatabase class
Creating and implementing the BookLibraryListing page
Creating and implementing the BookLibraryAddEdit page
Updating the Book Library cascading style sheet (CSS)
Updating the WebViewController class using C#
Launching the BookLibrary app using the iOS simulator
Summary
Chapter 11: Incorporating Microsoft Azure App Services
Understanding the Microsoft Azure App services platform
Setting up and configuring Microsoft Azure App services
Adding the Newtonsoft.Json NuGet package to our solution
Updating the WalkDataModel for our TrackMyWalks app
Creating and implementing the RestWebService interface
Creating and implementing the RestWebService class
Updating the BaseViewModel class to include our RestWebService
Updating the WalksMainPage code-behind using C#
Updating the WalksMainPageViewModel using C#
Updating the WalkEntryPage user interface using XAML
Updating the WalkEntryPageViewModel using C#
Launching the TrackMyWalks app using the iOS simulator
Summary
Chapter 12: Making Our App Social Using the Twitter API
Creating and registering the TrackMyWalks app with the Twitter Developer Portal
Adding the Xamarin.Auth NuGet Package to our solution
Creating and implementing the TwitterAuthDetails class
Creating and implementing the TwitterWebService interface
Creating and implementing the TwitterWebService class
Creating and implementing the TwitterSignInPageViewModel using C#
Creating and implementing the user interface for the TwitterSignInPage
Creating and implementing the TwitterSignInPageRenderer (iOS)
Updating the WalksMainPage code-behind using C#
Updating the WalkDistancePage user unterface using XAML
Registering the TwitterSignInPage within the App.xaml class
Launching the TrackMyWalks app using the iOS simulator
Summary
Chapter 13: Unit Testing Your Xamarin.Forms Apps
Creating the Unit Testing project within the TrackMyWalks solution
Adding the Moq NuGet package to the TrackMyWalks.UnitTests project
Adding the TrackMyWalks project to the TrackMyWalks.UnitTests project
Creating and implementing the WalksMainPageViewModelTest class
Creating and implementing the WalksEntryPageViewModelTest class
Running unit tests within the Visual Studio for Mac IDE
Creating a UITest project within the TrackMyWalks solution
Understanding the most commonly used Xamarin.UITest testing methods
Creating and implementing the CreateNewTrailDetails class for iOS
Updating the WalksMainPage code-behind using C#
Adding the Xamarin.Test Cloud.Agent NuGet package
Running UITests within the Visual Studio for Mac IDE
Summary
Other Books You May Enjoy
Index


๐Ÿ“œ SIMILAR VOLUMES


Mastering Xamarin UI Development: Build
โœ Steven F. Daniel ๐Ÿ“‚ Library ๐Ÿ“… 2018 ๐Ÿ› Packt Publishing ๐ŸŒ English

<b>Learn how to build stunning, maintainable, cross-platform mobile application user interfaces using C# 7 with the power of both the Xamarin and Xamarin.Forms frameworks. </b> Key Features <ul><li>Build effective native and cross-platform user interfaces using the Xamarin frameworks for iOS and A

Cross-platform UI Development with Xamar
โœ Paul F. Johnson ๐Ÿ“‚ Library ๐Ÿ“… 2015 ๐Ÿ› Packt Publishing ๐ŸŒ English

Xamarin is an IDE used for the development of native iOS, Android, and Windows, and cross-platform mobile applications in C#. For the mobile developer, that means learning three different languages to create the same application. Even if you use the Xamarin toolchain, you still need to work with thr

Mastering Xamarin UI Development
โœ Daniel, Steven F ๐Ÿ“‚ Library ๐Ÿ“… 2017 ๐Ÿ› PACKT Publishing Limited ๐ŸŒ English

<p><b>Build stunning, maintainable, cross-platform mobile application user interfaces with the power of Xamarin</b><p><b>About This Book</b><p><li>Create, configure, and customize stunning platform-specific features as well as cross-platform UIs with the power of Xamarin Forms.<li>Maximize the testa

Xamarin Mobile Application Development:
โœ Daniel Hermes ๐Ÿ“‚ Library ๐Ÿ“… 2015 ๐Ÿ› Apress ๐ŸŒ English

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