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

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 ...

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