Converter in Xamarin.Android and Xamarin.iOS

Oct 16, 2014 at 9:10 PM
Edited Oct 16, 2014 at 9:15 PM
Hello,

For my mobile project, I use Xamarin and MvvmLight.

For Windows Phone, I used to use the converters.

My question is that it is the equivalent on Android and iOS

Thank you
Mohamed
Coordinator
Oct 18, 2014 at 3:48 PM
Hi,

The IValueConverter interface might cause you issues as it doesn't seem to be available on Xamarin.

That said, if you have conversion logic, you can leverage it using the Binding.ConvertSourceToTarget and Binding.ConvertTargetToSource methods. Since the SetBinding method returns a Binding instance, you can just call these methods there.

Cheers
Laurent
Oct 19, 2014 at 9:05 PM
Hi,

Thank you, I'll look at your solution.

Cheers,
Mohamed