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 BaseViewModel class to include additional properties

Now that we have created our ImageConverter class, which will be used to convert a level of difficulty and return the associated URL for the image to be displayed in our XAML pages, our next step is to update the underlying C# code in our BaseViewModel class. Since our BaseViewModel class is used by each of our ViewModels, it makes sense to add these additional properties and instance methods in the BaseViewModel class.

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

  1. Locate and open the WalkBaseViewModel.cs class, ensure that it is displayed in the code editor, and enter the following highlighted code sections:
     //     //  BaseViewModel.cs // BaseView ...

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