Exemple #1
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            ObjectToBooleanConverter conv1 = new ObjectToBooleanConverter();
            bool bValue = (bool)conv1.Convert(value, targetType, parameter, culture);

            BoolToVisibilityConverter conv2 = new BoolToVisibilityConverter();

            return(conv2.Convert(bValue, targetType, null, culture));
        }
Exemple #2
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            bool bValue;

            if (value != null && value.GetType() == typeof(bool))
            {
                bValue = (bool)value;
            }
            else
            {
                ObjectToBooleanConverter conv = new ObjectToBooleanConverter();
                bValue = (bool)conv.Convert(value, targetType, parameter, culture);
            }


            if (bValue)
            {
                return("Oui");
            }
            else
            {
                return("Non");
            }
        }