using System;
//using System.Windows.Data;
//using System.Windows.Media;
using Windows.UI;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media;

namespace AsystentZakupówUA
{
    class BoolToBrushConverter : IValueConverter
    {
        private Brush brushBlack = new SolidColorBrush(Colors.Black);
        private Brush brushRed = new SolidColorBrush(Colors.Red);

        public object Convert(object value, Type targetType, object parameter, string language)
        {
            bool b = (bool)value;
            return b ? brushBlack : brushRed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }

        /*
        public object Convert(object value, Type targetType, object parameter,
                              System.Globalization.CultureInfo culture)
        {
            bool b = (bool)value;
            return b ? Brushes.Black : Brushes.Red;
        }

        public object ConvertBack(object value, Type targetType, object parameter,
                                  System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
        */
    }
}
