I have documented ValueConverters in the last few days - see https://github.com/slodge/MvvmCross/wiki/Value-Converters
I just added this ValueConverter custom visibility example to the article:
If you need to create your own Visibility ValueConverter, then the base classes MvxBaseVisibilityValueConverter<T> and MvxBaseVisibilityValueConverter can help with this - for example:
public class SayPleaseVisibilityValueConverter : MvxBaseVisibilityValueConverter<string> { protected override MvxVisibility Convert(string value, object parameter, CultureInfo culture) { return (value == "Please) ? MvxVisibility.Visible : MvxVisibility.Collapsed; } }
Using this approach, the plugin base class converts MvxVisibility to a suitable eigenvalue at runtime - so you only need to add this class type to your main PCL project - you do not need to add your own versions of the class - instead, the base class from the plugin will take care of the MvxVisibility -> native Visibility conversion MvxVisibility -> native Visibility .
Except> in addition to the Visibility enum support from the Plugin, recent changes to the Tibet binding have also added custom Visible binding properties to all platforms - it's just a bool , which is much easier to use - they should only work on iOS and Android, but on on Windows platforms, they will only work if you switch to the Tibet mvx:Bi.nd binding style (so not everyone prefers the approach!)
source share