In this section, we will be taking a look at the steps required to create the ViewModel for our DistTravelledViewModel
so that we can calculate how long the chosen walk from the main WalksPage
took to complete.
Let's take a look at how we can achieve this, by following these steps:
Create a new class file within the
ViewModels
folder calledDistTravelledViewModel
, as you did in the previous section entitled Creating the WalkBaseViewModel, located within this chapter.Next, ensure that the
DistTravelledViewModel.cs
file is displayed within the code editor, and enter the following code snippet:// // DistTravelledViewModel.cs // TrackMyWalks ViewModels // // Created by Steven F. Daniel on 22/08/2016. // Copyright © 2016 GENIESOFT STUDIOS. All rights reserved. // using TrackMyWalks.Models; using TrackMyWalks.ViewModels; &...