更新时间:2021-07-02 14:44:43
coverpage
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