万本电子书0元读

万本电子书0元读

顶部广告

Xamarin.Forms Projects电子书

售       价:¥

15人正在读 | 0人评论 9.8

作       者:Johan Karlsson

出  版  社:Packt Publishing

出版时间:2018-12-27

字       数:45.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Explore Xamarin.Forms to develop dynamic applications Key Features *Explore SQLite through Xamarin to store locations for various location-based applications *Make a real-time serverless chat service by using Azure SignalR service *Build Augmented Reality application with the power of UrhoSharp together with ARKit and ARCore Book Description Xamarin.Forms is a lightweight cross-platform development toolkit for building applications with a rich user interface. In this book you'll start by building projects that explain the Xamarin.Forms ecosystem to get up and running with building cross-platform applications. We'll increase in difficulty throughout the projects, making you learn the nitty-gritty of Xamarin.Forms offerings. You'll gain insights into the architecture, how to arrange your app's design, where to begin developing, what pitfalls exist, and how to avoid them. The book contains seven real-world projects, to get you hands-on with building rich UIs and providing a truly cross-platform experience. It will also guide you on how to set up a machine for Xamarin app development. You'll build a simple to-do application that gets you going, then dive deep into building advanced apps such as messaging platform, games, and machine learning, to build a UI for an augmented reality project. By the end of the book, you'll be confident in building cross-platforms and fitting Xamarin.Forms toolkits in your app development. You'll be able to take the practice you get from this book to build applications that comply with your requirements. What you will learn *Set up a machine for Xamarin development *Get to know about MVVM and data bindings in Xamarin.Forms *Understand how to use custom renderers to gain platform-specific access *Discover Geolocation services through Xamarin Essentials *Create an abstraction of ARKit and ARCore to expose as a single API for the game *Learn how to train a model for image *classification with Azure Cognitive Services Who this book is for This book is for mobile application developers who want to start building native mobile apps using the powerful Xamarin.Forms and C#. Working knowledge of C#, .NET, and Visual Studio is required.
目录展开

Title Page

Copyright and Credits

Xamarin.Forms Projects

Dedication

www.PacktPub.com

Why subscribe?

Packt.com

Foreword

Contributors

About the authors

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

Introduction to Xamarin

Native applications

Xamarin and Mono

Code sharing

Using existing knowledge

Xamarin.iOS

Xamarin.Android

Xamarin.Mac

Xamarin.Forms

The architecture of Xamarin.Forms

Defining a user interface using XAML

Defining a Label control

Creating a page in XAML

Creating a page in C#

XAML or C#?

Xamarin.Forms versus traditional Xamarin

When to use Xamarin.Forms

Setting up a development machine

Setting up a Mac

Installing Xcode

Installing Visual Studio

Configuring the Android emulator

Setting up a Windows machine

Installing Xamarin for Visual Studio

Pairing Visual Studio with a Mac

Configuring an Android emulator and hardware acceleration

Configuring UWP developer mode

Summary

Building Our First Xamarin.Forms App

Technical requirements

An overview of the project

Beginning the project

Setting up the project

Creating the new project

Examining the files

DoToo

DoToo.Android

DoToo.iOS

DoToo.UWP

Updating the Xamarin.Forms packages

Removing the MainPage file

Creating a repository and a TodoItem model

Defining a to-do list item

Creating a repository and its interface

Connecting SQLite to persist data

Adding the SQLite NuGet package

Updating the TodoItem class

Creating a connection to the SQLite database

Implementing the Get, Add, and Update methods

Using MVVM – creating Views and ViewModels

Defining a ViewModel base class

Introducing PropertyChanged.Fody

Creating the MainViewModel

Creating the TodoItemViewModel

Creating the ItemViewModel

Creating the MainView

Creating the ItemView

Wiring up a dependency injection through Autofac

Adding a reference to Autofac

Creating the resolver

Creating the bootstrapper

Adding a bootstrapper on iOS

Adding a bootstrapper in Android

Adding a bootstrapper in UWP

Making the app run

Adding data bindings

Navigating from the MainView to the ItemView to add a new item

Adding new items to the list

Binding the ListView in the MainView

Creating a ValueConverter for the item status

Using the ValueConverter

Navigating to an item using a command

Marking an item as complete using a command

Creating the filter toggle function using a command

Laying out contents

Setting an application-wide background color

Laying out the MainView and ListView items

The filter button

Touching up the ListView

Summary

A Matchmaking App with a Rich UX Using Animations

Technical requirements

Project overview

Creating the matchmaking app

Creating the project

Creating the new project

Updating the Xamarin.Forms NuGet packages

Designing the MainPage file

Creating the Swiper control

Creating the control

Defining the main grid

Adding a content view for the photo

Creating the DescriptionGenerator

Creating a picture class

Binding the picture to the control

Setting the source

Controlling the loading label

Handling pan gestures

Testing the control

Creating decision zones

Extending the grid

Adding the StackLayout for liking photos

Adding the StackLayout for denying photos

Determining the screen size

Adding a clamp function

Adding code to calculate the state

Defining a method for calculating the state

Wiring up the pan state check

Adding exit logic

Checking if the image should exit

Removing the image

Updating PanCompleted

Adding events to the control

Declaring two events

Raising the events

Wiring up the Swiper control

Adding images

Adding initial photos

Making the call from the constructor

Adding count labels

Subscribing to events

Adding methods to update the GUI and respond to events

Wiring up events

Summary

Building a Location Tracking App Using GPS and Maps

Technical requirements

Project overview

Getting started

Building the MeTracker app

Creating a repository to save the location of the users

Creating a model for the location data

Creating the repository

Xamarin.Essentials

Installing the NuGet package

Configuring Xamarin.Essentials on Android

Creating a service for location tracking

Setting up the app logic

Creating a view with a map

Creating a ViewModel

Creating a resolver

Creating the bootstrapper

Creating the iOS bootstrapper

Creating the Android bootstrapper

Setting the MainPage

Background location tracking on iOS

Enabling location updates in the background

Getting permissions to use the location of the user

Subscribing to location updates

Background location tracking with Android

Adding the required permissions to use the location of the user

Creating a background job

Scheduling a background job

Subscribing to location updates

Creating a heat map

Adding a GetAll method to the LocationRepository

Preparing the data for visualization

Creating custom renderers

Creating a custom control for the map

Creating a custom renderer to extend the map in the iOS app

Creating a custom renderer to extend the map in the Android app

Refreshing the map when resuming the app

Summary

Building a Weather App for Multiple Form Factors

Technical requirements

Project overview

Getting started

Building the weather app

Creating models for the weather data

Adding the weather API models manually

Adding the app-specific models

Adding the ForecastItem model

Adding the Forecast model

Creating a service for fetching the weather data

Configuring the applications to use location services

Configuring the iOS app to use location services

Configuring the Android app to use location services

Configuring the UWP app to use location services

Creating the ViewModel class

Getting the weather data

Grouping the weather data

Creating a Resolver

Creating a bootstrapper

Creating a RepeaterView based on a FlexLayout

Creating the view for tablets and desktop computers

Using RepeaterView

Adding a toolbar item to refresh the weather data

Adding a loading indicator

Setting a background image

Creating the view for phones

Using a grouped ListView

Adding pull to refresh functionality

Navigating to different views based on the form factor

Handling states with VisualStateManager

Creating a behavior to set state changes

Summary

Setting up a Backend for a Chat App Using Azure Services

Technical requirements

Azure serverless services

Azure SignalR Service

Azure functions

Azure blob storage

Azure Cognitive Services

Project overview

Building the serverless backend

Creating a SignalR service

Creating a storage account

Creating a Cognitive Service

Creating functions

Creating the Azure service for functions

Creating a function to return the connection information for the SignalR service

Creating a message library

Creating a storage helper

Creating a function for sending messages

Using the Computer Vision API to scan for adult content

Creating a scheduled job to clear photos from storage

Deploying the functions to Azure

Summary

Building a Real-Time Chat Application

Technical requirements

Project overview

Getting started

Building the chat app

Creating the chat service

Initializing the app

Creating a resolver

Creating a Bootstrapper

Creating a base ViewModel

Creating the Mainview

Creating MainViewModel

Creating the MainView

Replacing the MainPage

Editing the XAML

Fixing the code behind the view

Setting the main view

Creating the ChatView

Creating the ChatViewModel

Creating the class

Adding the text property

Receiving messages

Creating the LocalSimpleTextMessage class

Sending text messages

Installing the Acr.UserDialogs plugin

Installing the Media plugin

Sending photos

Creating the ChatView

Creating Base64ToImageConverter

Creating the skeleton ChatView

Adding ResourceDictionary

Adding ListView

Adding templates

Creating a template selector

Adding the buttons and entry control

Fixing the code behind

Styling

Styling with CSS

Applying the style sheet

Handling life cycle events

Summary

Creating an Augmented-Reality Game

Technical requirements

Essential theory

An overview of the project

Beginning the project

Creating the project

Updating the Xamarin.Forms NuGet packages

Setting the Android target to 8.1

Adding the camera permission to Android

Adding Camera Usage Description for iOS

Defining the user interface

Creating the ARView control

Modifying the MainPage

Adding Urhosharp

Installing the UrhoSharp NuGet package for iOS

Installing the UrhoSharp.ARCore Nuget Package for Android

Adding the Android life cycle events

Defining the PlaneNode

Adding custom renderers for the ARView control

For iOS

For Android

Creating the game

Adding the shared partial Game class

CreateSubPlane

UpdateSubPlane

FindNodeByPlaneId

Adding platform-specific partial classes

Adding the iOS-specific partial class

Adding the Android-specific partial class

Writing the ARKit-specific code

Defining the ARKitComponent

Writing handlers for adding and updating anchors

SetPositionAndRotation

UpdateOrAddPlaneNode

OnAddAnchor

OnUpdateAnchors

Writing a handler for removing anchors

OnRemoveAnchors

Initializing ARKit

Writing ARCore-specific code

Defining the ARCoreComponent

SetPositionAndRotation

Writing a handler for ARFrame updates

Initializing ARCore

OnConfigRequested

InitializeAR

Writing the game

Adding a camera

Configuring a renderer

Adding lights

Implementing the game startup

Adding boxes

AddBox()

OnUpdate()

Making boxes rotate

Creating the rotate component

Assigning the Rotator component

Adding box hit-test

Adding a death animation

DetermineHit()

OnTouchBegin()

Wiring up input

Updating statistics

Defining a statistics class

Sending updates via MessagingCenter

Wiring up events

Updating the GUI

Subscribing to the updates in the MainForm

Summary

Hot Dog or Not Hot Dog Using Machine Learning

Technical requirements

Machine learning

Azure Cognitive Services – Custom Vision

CoreML

TensorFlow

Project overview

Getting started

Building the Hot Dog or Not Hot Dog application using machine learning

Training a model

Tagging images

Training a model

Exporting a model

Building the app

Classifying images with machine learning

Using CoreML for image classification

Using TensorFlow for image classification

Creating a base ViewModel

Initializing the app

Creating a Resolver

Creating a Bootstrapper

Creating the iOS bootstrapper

Creating the Android bootstrapper

Building the first view

Building the ViewModel

Building the view

Building the result view

Building the ViewModel

Building the view

Summary

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部