As mentioned in the previous section, value converters form an important concept in data binding as they allow you to customize the appearance of a data property at the time it is bound. This process is quite similar to WPF (Windows Presentation Foundation) on the Windows application development platform. Xamarin.Forms
provides you with a number of value converter interfaces as part of its API.
Value converters are extremely helpful when working with the Xamarin.Forms
platform, as they allow you to toggle the visibility of elements, based on a Boolean property.
In this section, we will create a BooleanConverter
that we will use to hide controls until the ViewModel has completely finished loading. We will also create a converter that converts a string value into a URL property that will be used to display an image for our difficulty rating.
Let's take a look at how we can achieve this, by following the steps:
Create a new folder, within...