Updating the WalksMainPage code-behind using C#

Now that we have updated our user interface to include our ContextActions as well as each of the menu item choices that we would like to appear, including each of the various data bindings, the next step is to begin updating the underlying C# code within our WalksMainPage code-behind file so that it can communicate with our ViewModel and populate our ListView with information from our WalkDataModel.

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

Open the WalksMainPage.xaml.cs code-behind file, ensuring that it is displayed within the code editor, and enter the following highlighted code sections:

 // //  WalksMainPage.xaml.cs // Displays Walk Information within a ListView ...

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.