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 WalkDistancePageViewModel using C#

Now that we have updated the WalkTrailInfoPage code-behind file so that it communicates with our WalkTrailInfoPageViewModel 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. This will be used by our WalkDistancePage code-behind file so that it can display information related to the chosen walk trail from our WalksMainPage.

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

  1. First, create a new Empty Class called WalkDistancePageViewModel, like you did in the section entitled Creating the WalksMainPageViewModel using C#, located within this ...

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