Now that we have updated the WalkEntryPage code-behind file so that it communicates with WalkEntryPageViewModel as well as each of the associated data bindings for the ContentPage that'll be used by ViewModel, the next step is to create and implement the underlying C# code for ViewModel. This'll be used by WalkTrailInfoPage code-behind file so that it can display information related to the chosen walk trail from WalksMainPage.
Let's take a look at how we can achieve this by following these steps:
- First, create a new Empty Class called WalkTrailInfoPageViewModel, like you did in the section entitled Creating the WalksMainPageViewModel using C#, located within this chapter.
- Next, ensure that the WalkTrailInfoPageViewModel.cs file is displayed within the code editor and enter the following code snippet:
//
...