Updating the WalkDistancePage code-behind using C#

Now that we have updated our user interface for our ContentPage using XAML to include minor changes to our ContentPage control, as well as specify properties for our CustomMapOverlay local namespace, the next step is to begin updating the underlying C# code within our WalkDistancePage code-behind file. We will do this to communicate with our WalkDistancePageViewModel, which will be used to interact with our CustomMapOverlay control, and place a pin placeholder that will contain information associated with the chosen walk trail from the ListView contained within our WalksMainPage.

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

Open the WalkDistancePage.xaml.cs code-behind ...

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.