Before we initialize the app, we will create a base ViewModel class so that we can use it when we are registering the other ViewModel instances. In this, we will put the code that can be shared between all the ViewModel instances of the app. Let's set this up by going through the following steps:
- In the HotDogOrNot project, create a new folder called ViewModels.
- Create a new class called ViewModel in the ViewModels folder we created.
- Make the class public and abstract.
- Add and implement the INotifiedPropertyChanged interface. This is necessary because we want to use data bindings.
- Add a Set method that will make it easier for us to raise the PropertyChanged event from the INotifiedPropertyChanged interface. The method will check whether the value has changed. If it has, it will raise the event.
- Add a static property of the INavigation type ...