A value converter allows you to dynamically convert values during the process of data binding before the bound value is actually used. A value converter at heart, is a custom class that inherits from the
IValueConverter interface. This interface contains two methods—
ConvertBack—which we have to implement. Once the value converter is created, we can use it directly in our XAML.
Converters let us define custom logic for the different properties we have in our application. It is not uncommon to see a converter that converts one type of value to a completely different type, for example, a converter that converts a number value to a color value. Another example would be a conversation of text to Boolean ...