using System; using System.Globalization; using Xamarin.Forms; namespace comal.timesheets { // public class BooleanToColorConverter: BindableObject, IValueConverter // { // // public static readonly BindableProperty DefaultColorProperty = // BindableProperty.Create(nameof(DefaultColor), typeof(Color), typeof(BooleanToColorConverter), Color.Transparent); // // public Color DefaultColor // { // get => (Color)GetValue(DefaultColorProperty); // set => SetValue(DefaultColorProperty, value); // } // // public object Convert(object value, Type targetType, object parameter, CultureInfo culture) // { // if ((value is bool bValue) && (parameter is Binding bColor)) // { // bColor. // } // return bValue ? cColor : DefaultColor; // return DefaultColor; // } // // public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) // { // throw new NotImplementedException(); // } // } }