Creating an integer to image value converter

In this section, we will continue to improve the user experience with the use of another value converter. Currently, the detail page binds to the Rating property and simply displays the integer value as a formatted string, which is a rather boring way to display data, as shown in the following screenshot:

This rating data would look much nicer, and stand out to the user much more if it were an image of stars instead of plain text. In order to translate a number value to an image, we will need to create a new value converter, as shown in the following steps:

  1. Create a new class file in the core library ...

Get Mastering Xamarin.Forms - Second Edition 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.