Russell Fustino 2018
Russell Fustino Azure and Xamarin Forms
1. Installing Visual Studio 2017
Russell Fustino 1
(1)
New Port Richey, Florida, USA
In this chapter, you will learn how to install Visual Studio 2017, which will be used to complete the examples in this book.
Note
The source code and assets for this book can be downloaded from https://github.com/Apress/azure-and-xamarin-forms
Installing Visual Studio 2017 and Tools on Windows
This chapter covers how to install the required products to complete all the examples in this book.
Windows 10 Pro or higher is required to run the emulators and cross platform development for iOS, Android , and Universal Windows Platform (UWP) .
Download and install Visual Studio Community 2017 or later versions, available at www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community .
Select and install the UWP development workload, (Figure ) under the Windows section, and Mobile development with .NET.
Select the .NET (cross platform development using Xamarin ) option, under the Mobile & Gaming section (Figure ) on the Visual Studio (VS) 2017 Installer.
Figure 1-1
Select Universal Windows Platform development
Figure 1-2
Select Mobile development with .NET
Install ASP.NET and web development Azure development under the Web & Cloud section (Figure ).
Figure 1-3
Select ASP.NET and web development Azure development
Install Data storage and processing, under the same section (Figure ).
Figure 1-4
Select Data storage and processing
Under the Individual components tab, under the Emulators section, check off the following (Figure ):
Google Android Emulator (global)
Intel Hardware Accelerated Execution Manager (global)
Visual Studio Emulator for Android
All Windows 10 Mobile Emulator (Anniversary Edition AND Creators Update)
If you do not see Google Android Emulator listed, this means that you do not have Hyper-V enabled. See Chapter for how to enable Hyper-V. In the meantime, start the install.
Figure 1-5
Select Google Android Emulator (global), Intel Hardware Accelerated Execution Manager (global), Visual Studio Emulator for Android, and Windows 10 Mobile Emulator (Anniversary Edition and Creators Update)
Installing Visual Studio 2017 and Tools on the Mac
Optionally, install Visual Studio for the Mac. The purpose for a Mac installation would be to run, test, and deploy iOS and Android versions of your app in a Mac environment (UWP not supported). To build iOS apps on a PC, you must be wired to a Mac on the same network. Most of the examples in this book will use either the Android emulator or UWP local machine on a PC, so the Mac install is optional for the book. Instructions are available at https://developer.xamarin.com/guides/ios/getting_started/installation/mac/ .
Other Tools
Postman ( www.getpostman.com and install)
SQL Server Management Studio ( https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms ). This tool will be used to verify our database contents.
Firefox ( www.mozilla.org/firefox/new/ ). Firefox has a nicely formatted view when looking at JSON data coming back from a web service.
Summary
In this chapter, you learned how to install Visual Studio 2017, which will be used to complete the examples in this book, and some other tools, such as Postman, SQL Server Management Studio, and Firefox. Visual Studio for the Mac is an optional installation. In the next chapter, we will build a Xamarin Forms app.
Russell Fustino 2018
Russell Fustino Azure and Xamarin Forms
2. Introduction to Xamarin Forms
Russell Fustino 1
(1)
New Port Richey, Florida, USA
Xamarin Forms is an awesome cross platform environment from which to build iOS, Android, and UWP apps, as well as other potential platforms in the future.
Project Overview
In this chapter, youll get your feet wet with Xamarin Forms via five projects. Each project builds on the prior one. Several topics will be covered in this introductory chapter, including how to create a Xamarin Forms solution, as well as emulator tips, navigation, images, event handlers, device form factors, and list views. The result will be a typical app with a main navigation page, a list view page, and a detail page that you can use as a template for building future apps! We will be creating a book list project that has a main navigation page that looks like that in Figure .
Figure 2-1
Main navigation page in the completed project
It has a list view page that looks like that in Figure .
Figure 2-2
ListView page in the completed project
The app will navigate to a detail page on the Apress site for the book selected from a list such as that in Figure .
Figure 2-3
Detail page in the completed project
Well first create a new Xamarin Forms application and review the structure of the solution. Well then run the application for Android, UWP, and, optionally, iOS, if connected with a Mac server . As this is a cross platform app, you can use any mix of the platform projects, depending on your development environment (Mac or Windows).
We will then enhance the app, to have a main navigation page, with StackLayout and GridLayout , which considers device form factors for phones and tablets, using device-specific logic.
We will use XAML and code behind to control your layout form factors for tablets and phones.
We will also use embedded resource images of the MainPage.
A ListView page will be added with a selection event handler. You can also run these examples on Visual Studio (VS) for Mac; however, this does not support UWP.
Next page