View-models with Xamarin native

After we add the libraries, let's start with the AudioPlayer.Portable project. Create a new folder called ViewModels, and add a new file called MainPageViewModel.cs. Let's start implementing our first view-model with MVVMCross:

namespace AudioPlayer.Portable.ViewModels 
{ 
    using MvvmCross.Core.ViewModels; 
 
    public class MainPageViewModel : MvxViewModel 
    { 
        public MainPageViewModel() 
        { 
        } 
   } 
} 

When we built our Xamarin.Forms view-models, we created our own base view-model for handling property changes; using this library we can cut a few corners with base properties. MvxViewModel has a similar implementation with handling property changes; for our MainPage, we are going to develop the same first page as the last chapter, ...

Get Xamarin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.