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