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:
- First, create a new Empty Class called WalkEntryPageViewModel, like you did in the section entitled Creating the WalksMainPageViewModel using C#, located within this chapter.
- Next, ensure that the WalkEntryPageViewModel.cs file is displayed within the...