Chapter 6. Custom Renderers

Xamarin is a framework that allows us to write most of the UI code in a platform-agnostic style. In this chapter, we will understand how Xamarin.Forms does it and how we can create our own platform agnostic components, providing them a platform-specific appearance.

Rendering model

So far, our point of view has been focused on developing solutions using the Xamarin.Forms.Core libraries, creating our own shareable or PCL projects. The Xamarin.Forms.Core library uses the platform-specific Xamarin.Forms.Platform libraries. These libraries are a collection of classes called renderers. Each renderer transforms the agnostic elements in a platform specific user interface.

For example, suppose we need a user interface object that ...

Get Xamarin 4 By Example 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.