using System; using System.Globalization; using Xamarin.Forms; namespace InABox.Mobile { public class GuidToBooleanConverter : IValueConverter { public bool EmptyValue { get; set; } public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return (value != null) && ((Guid)value != Guid.Empty) ? !EmptyValue : EmptyValue; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }