March 2018
Intermediate to advanced
192 pages
4h 4m
English
The main purpose of a ViewModel is to separate the business logic, for example, data access and data manipulation, from the user interface logic. Right now, our MainPage directly defines the list of data that it is displaying. This data will eventually be dynamically loaded from an API but for now, we will move this initial static data definition to its ViewModel so that it can be data bound to the user interface.
In order to create the ViewModel for MainPage, perform the following steps:
public class MainViewModel : BaseViewModel { // ... }