Book Image

Mastering Xamarin UI Development - Second Edition

By : Steven F. Daniel
Book Image

Mastering Xamarin UI Development - Second Edition

By: Steven F. Daniel

Overview of this book

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.
Table of Contents (15 chapters)

Conventions used

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Before we can proceed, we need to create our PlanetaryApp project."

A block of code is set as follows:

    //
// GameTile.cs
// Creates each of our tile images for our Tile Slider Game.
//
// Created by Steven F. Daniel on 24/04/2018.
// Copyright © 2018 GENIESOFT STUDIOS. All rights reserved.
//
using UIKit;
using SlidingTiles.Interfaces;
using CoreGraphics;
using System;

namespace SlidingTiles.Classes
{

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

    <?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps"
x:Class="TrackMyWalks.Views.WalkDistancePage">
<ContentPage.Content>
<ScrollView Padding="2,0,2,2">
<StackLayout Orientation="Vertical" HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<maps:Map x:Name="customMap" IsShowingUser="true" MapType="Street" />
<Button x:Name="EndThisTrail" Text="End this Trail"
TextColor="White" BackgroundColor="#008080"
Clicked="EndThisTrailButton_Clicked" Margin="20" />
</StackLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage>

Any command-line input or output is written as follows:

Last login: Fri Aug 24 16:40:41 on console 
stevens-mbp:~ stevendaniel$ curl https://trackmywalk.azurewebsites.net/tables/WalkEntries
--header
"ZUMO-API-VERSION:2.0.0

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Alternatively, you can specify it for the Android platform by selecting the Android node in the SDK Locations section."

Warnings or important notes appear in a box like this.
Tips and tricks appear like this.