售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜