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

Updating the TripLog app

Now that our platform services, navigation service, and ViewModels have all been registered in the IoC container, we will need to add the Ninject Modules that we created to the Ninject Kernel. We will do this in our main Xamarin.Forms.Application class: App.

In order to get our platform modules into the App class, which is in our core library, we will simply update the App constructor to take in INinjectModule parameters. Then, each platform-specific project will be responsible for passing in its respective Ninject Module when it loads the App at startup, as shown in the following steps:

  1. Update the App constructor to take in INinjectModule parameters:
      public App (params INinjectModule[] platformModules)       { // ... ...
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