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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.