Creating the WalkEntryPageViewModel using C#

Now that we have updated the WalksMainPage code-behind file so that it communicates with our WalksMainPageViewModel as well as each of the associated data bindings for the ContentPage that will be used by the ViewModel, the next step is to create and implement the underlying C# code for our ViewModel that will be used by our WalkEntryPage code-behind file. This allows the user to add or edit walk trail information within our WalkDataModel data model, as well as validate the information that's provided.

Let's take a look at how we can achieve this by following these steps:

  1. First, create a new Empty Class called WalkEntryPageViewModel, like you did in the section entitled Creating the WalksMainPageViewModel ...

Get Mastering Xamarin UI Development - Second 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.