Creating the view for the customer details

Add another Forms ContentPage Xaml file named CustomerDetails.

Open CustomerDetails.xaml, and modify its contents, as shown in the following markup, and note the following:

  • Title of the ContentPage element has been set to Edit Customer
  • Grid with two columns and six rows is used for the layout
  • Editor elements are two-way bound to properties of the Customer class
<?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="NorthwindMobile.Views.CustomerDetails" Title="Edit Customer"> <ContentPage.Content> <StackLayout VerticalOptions="Fill" HorizontalOptions="Fill"> <Grid BackgroundColor="Silver"> ...

Get C# 7.1 and .NET Core 2.0 – Modern Cross-Platform Development - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.