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

Updating the WalkDistancePageViewModel using C#

Now that we have updated our WalkEntryPageViewModel ViewModel so that it can communicate with our LocationService class to obtain the current GPS Latitude and Longitude coordinates of the device, we can now proceed to start updating the WalkDistancePageViewModel class. We are doing this so that it can use our location service to obtain the current GPS device location, as well as handle checking for changes in GPS location in the background and raising an EventHandler containing the updated coordinates that we can reference within our WalkDistancePage.xaml.cs code-behind file.

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

  1. Ensure that the WalkDistancePageViewModel.cs ...

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