Skip to Content
Mastering Xamarin.Forms - Second Edition
book

Mastering Xamarin.Forms - Second Edition

by Ed Snider
March 2018
Intermediate to advanced content levelIntermediate to advanced
192 pages
4h 4m
English
Packt Publishing
Content preview from Mastering Xamarin.Forms - Second Edition

Registering the navigation service

In the previous chapter, we created a custom navigation service and used the Xamarin.Forms DependencyService to register and resolve the navigation  service. Now that we have introduced Ninject, we can swap Xamarin.Forms DependencyService out for a Ninject Module instead, in order to register the navigation service so that it can be resolved and used just like our platform-specific services.

  1. First, remove the assembly attribute that was originally added above the class's namespace:
      // Remove assembly attribute      // [assembly: Dependency(typeof(XamarinFormsNavService))]      public class XamarinFormsNavService : INavService      {          // ...      }

We originally instantiated the navigation service and registered view mappings ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Xamarin.Forms - Third Edition

Mastering Xamarin.Forms - Third Edition

Ed Snider
Xamarin.Forms Projects - Second Edition

Xamarin.Forms Projects - Second Edition

Daniel Hindrikes, Johan Karlsson
Xamarin.Forms Projects

Xamarin.Forms Projects

Johan Karlsson, Daniel Hindrikes

Publisher Resources

ISBN: 9781788290265Supplemental Content