Implementing the WalksMainPage 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 WalksMainPage code-behind file, which will be used to populate our data model with static data. This will then display this information within our ListView.

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 in the following code snippet:

     //     //  WalksMainPage.xaml.cs     //  Displays Walk Information within a ListView control from an array     //     //  Created by Steven F. Daniel on 14/05/2018 // Copyright © 2018 GENIESOFT STUDIOS. All ...

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.