O'Reilly logo

Mastering Xamarin UI Development - Second Edition by Steven F. Daniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required