| 123456789101112131415161718192021222324252627 | using System;using System.Globalization;using Xamarin.Forms;namespace InABox.Mobile{    public class BooleanToLayoutOptionsConverter : IValueConverter    {        public LayoutOptions TrueValue { get; set; }        public LayoutOptions FalseValue { get; set; }                public object Convert(object value, Type targetType, object parameter, CultureInfo culture)        {            return TrueValue;            //if ((value is bool bvalue) && bvalue)            //    return TrueValue;            //return FalseValue;        }        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)        {            if (value is LayoutOptions length)                return length.Equals(TrueValue);            return false;        }    }}
 |