Inversion of Control 

IoC is a design principle in which the responsibility of selecting concrete implementations for dependencies of a class is delegated to an external component or source. This way, the classes are decoupled from their dependencies so that they can be replaced/updated without much hassle.

The most common implementation of this principle is using the service locator pattern, where a container is created to store the concrete implementations, often registered via an appropriate abstraction, as shown in the following diagram: 

Xamarin.Forms offers DependencyService, which can be especially helpful when you're creating platform-specific implementations for platform-agnostic requirements. We must also remember that it should only be used in Xamarin.Forms platform projects; otherwise, we would be creating an unnecessary dependency on Xamarin.Forms libraries.