Example #1
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var    id         = (Guid)value;
            double percentage = (parameter == null)? 1 : DoubleParameterFormatter.Format(parameter.ToString());

            return(new SolidColorBrush(ColoredItem.GenerateColor(id, (byte)(255 * percentage))));
        }
Example #2
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            double percentage = DoubleParameterFormatter.Format(parameter.ToString());

            return(double.Parse(value.ToString()) * percentage);
        }