Creating and implementing the BaseViewModel

In this section, we will take a look at how to create the BaseViewModel class that will essentially be an abstract class containing basic functionality that each of our ViewModels will inherit from and implement the INotifyPropertyChanged interface. The advantage of creating a BaseViewModel class is that it is much easier to add additional functionality to this model, and then implement these in the relevant class files.

Let's start by creating the BaseViewModel class for our TrackMyWalks application by performing the following steps:

  1. Ensure that the TrackMyWalks solution is open within the Visual Studio for Mac IDE.
  2. Next, right-click on the TrackMyWalks project, and choose Add | New Folder from ...

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.