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

Implementing the WalkDistancePage code using C#

Now that we have defined our user interface for our ContentPage using XAML, the next step is to begin creating the underlying C# code within our WalkDistancePage code-behind file, which will be used to interact with our Map control and place a pin placeholder that will contain information relating to the chosen trail from the ListView control that is 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 file, ensuring that it is displayed within the code editor, and enter the following code snippet:

    //    //  WalkDistancePage.xaml.cs // Displays related trail information within a map using a pin placeholder ...

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