© Paul Johnson 2018
Paul JohnsonUsing MVVM Light with your Xamarin Appshttps://doi.org/10.1007/978-1-4842-2475-5_3

3. Inversion of Control (IoC) & Messaging

Paul Johnson1 
(1)
Merseyside, UK
 

For any form of MVVM system to work within your Xamarin application, it must rely on a pattern known as inversion of control. Without some form of IoC in place, the PCL part of the application will just act as a library. By definition, a library can only supply information—it cannot inject information.

Along with IoC comes dependency injection (or DI, as it is often referred to). Dependency injection is a technique often used to have the library injection information from another service (typically hosted on the platform). It then relies upon that information to ...

Get Using MVVM Light with your Xamarin Apps 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.