Пример #1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Item.PriorityState p = (Item.PriorityState)value;
            switch (p)
            {
            case Item.PriorityState.Normal: return(Brushes.Silver);

            case Item.PriorityState.Low: return(Util.ColorToBrush("80FF80"));

            case Item.PriorityState.Medium: return(Util.ColorToBrush("FFCB80"));

            case Item.PriorityState.High: return(Util.ColorToBrush("FF8080"));

            default: return(Brushes.Silver);
            }
        }
Пример #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Item.PriorityState p = (Item.PriorityState)value;
            switch (p)
            {
            case Item.PriorityState.Normal: return(Brushes.Black);

            case Item.PriorityState.Low: return(Brushes.Green);

            case Item.PriorityState.Medium: return(Brushes.Orange);

            case Item.PriorityState.High: return(Brushes.Red);

            default: return(Brushes.Black);
            }
        }