O'Reilly logo

Mastering Xamarin UI Development - Second Edition by Steven F. Daniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating the BaseViewModel to use the navigation service

Now that we have created both our NavigationService Interface and Class, we will be able to navigate within our ViewModels. The next step is to update the underlying C# code within 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 within the BaseViewModel class.

Let's take a look at how we can achieve this by following these steps:

  1. Open the BaseViewModel.cs class, ensuring that it is displayed within the code editor, and enter the following highlighted code sections:
     //     //  BaseViewModel.cs     //  BaseView Model Class that each of our ViewModels will inherit from     // // Created ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required