public override Style SelectStyle(object item, DependencyObject container)
        {
            if (conditionalFormattingDemo == null)
            {
                conditionalFormattingDemo = (ConditionalFormattingDemo)Activator.CreateInstance(typeof(ConditionalFormattingDemo));
            }

            return(conditionalFormattingDemo.Resources["normaltableSummaryCell"] as Style);
        }
Example #2
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (conditionalFormattingDemo == null)
            {
                conditionalFormattingDemo = (ConditionalFormattingDemo)Activator.CreateInstance(typeof(ConditionalFormattingDemo));
            }
            double _value;

            if (!String.IsNullOrEmpty(value as string))
            {
                _value = double.Parse(value.ToString(), NumberStyles.Currency);
                if (_value < 6600000.00 && _value > 1000000.00)
                {
                    return(conditionalFormattingDemo.Resources["Brush2"]);
                }
            }
            return(new SolidColorBrush());
        }