A BaseViewModel is a reusable superclass for page-specific ViewModels. It centralizes UI notification and shared page state, so each derived ViewModel avoids repeating the same implementation. section 9.5.2
A practical BaseViewModel commonly provides:
- INotifyPropertyChanged and OnPropertyChanged so bound views respond when ViewModel state changes. section 9.5.2
- Title and IsLoading properties for state shared across pages. section 9.5.2
- An INavigation property when the application uses navigation paradigms that require access to the navigation stack. section 9.5.2
Deriving a page ViewModel
InputViewModel inherits from BaseViewModel, then adds page-specific commands, search results, a selected product, and a count. The shared notification and page-state behavior remains in the base class.
