示例#1
0
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            ChartItemsPanel chartItemsPanel = value as ChartItemsPanel;
            TaskDetail      taskDetail      = chartItemsPanel.Item;

            if (taskDetail.IsHeader)
            {
                return(taskDetail.Name);
            }

            return(value);
        }
示例#2
0
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            ChartItemsPanel chartItemsPanel = value as ChartItemsPanel;
            TaskDetail      taskDetail      = chartItemsPanel.Item as TaskDetail;

            if (taskDetail != null)
            {
                if (int.Parse(taskDetail.ID) <= 7)
                {
                    return(new SolidColorBrush(Color.FromArgb(255, 71, 115, 181)));
                }
                else if (int.Parse(taskDetail.ID) <= 17)
                {
                    return(new SolidColorBrush(Color.FromArgb(255, 127, 102, 173)));
                }
                else
                {
                    return(new SolidColorBrush(Color.FromArgb(255, 77, 159, 85)));
                }
            }

            return(value);
        }