Updating the WalksMainPage code-behind using C#
Now, we have updated our BaseViewModel
class to include a property that references our RestWebService
class. Our next step is to begin updating the underlying C# code within our WalksMainPage
code-behind file so that it can communicate with our RestWebService
class and the associated ViewModel
to populate our ListView
with information from our WalkDataModel
, which we will populate from our SQL Server database within the Microsoft Azure platform.
Let's take a look at how we can achieve this by going through the following steps:
- Locate and open the
WalksMainPage.xaml.cs
file, which is located within theViews
folder, and ensure that it is displayed within the code editor. Enter the following highlighted code sections:
// // 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 rights reserved...