예제 #1
0
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value == null)
            {
                return(DependencyProperty.UnsetValue);
            }
            var s = value.ToString();

            if (s == null)
            {
                return(DependencyProperty.UnsetValue);
            }
            if (s.ToUpper() == True.ToUpper())
            {
                return(true);
            }
            if (s.ToUpper() == False.ToUpper())
            {
                return(false);
            }
            return(DependencyProperty.UnsetValue);
        }