码迷,mamicode.com
首页 > Web开发 > 详细

Silverlight 设置颜色

时间:2014-06-03 15:21:24      阅读:337      评论:0      收藏:0      [点我收藏+]

标签:c   style   a   ext   color   width   

透明色:00ff00ff

  //设置柱状图的颜色
                ColorSet cs = new ColorSet();
                cs.Id = "colorset1";

 #region 设置柱状图的颜色 待开发
                    string strColor = oYAXIS.Color;
                    switch (strColor)
                    {
                        case "Red":
                            cs.Brushes.Add(new SolidColorBrush(Color.FromArgb(0xff, 0xff, 0x45, 0x00))); //#FFFF4500 orangeRed
                            break;
                        case "Yellow":
                            cs.Brushes.Add(new SolidColorBrush(Color.FromArgb(0xff, 0xda, 0xa5, 0x20)));//FFDAA520 Goldenrod
                            break;
                        case "Orange":
                            cs.Brushes.Add(new SolidColorBrush(Colors.Orange));
                            break;
                        case "Green":
                            cs.Brushes.Add(new SolidColorBrush(Colors.Green));
                            break;
                        case "Blue":
                            cs.Brushes.Add(new SolidColorBrush(Color.FromArgb(0xff, 0x41, 0x69, 0xe1))); //FF4169E1 RoyalBlue
                            break;
                        case "White":
                            cs.Brushes.Add(new SolidColorBrush(Color.FromArgb(0xff, 0xff, 0xff, 0xff))); //FFFFFFFF RoyalBlue Color.FromArgb(0xff, 0xff, 0xff, 0xff) 透明色;00ff00ff
                            break;
                        default:
                            break;
                    }
                    #endregion

 

 

  #region 设置 Chart 使用自定义的颜色集合 colorset1
                if (cs.Brushes.Count > 0)
                {
                    chart.ColorSets.Clear();
                    chart.ColorSets.Add(cs);
                    chart.ColorSet = "colorset1";
                }
                # endregion

Silverlight 设置颜色,布布扣,bubuko.com

Silverlight 设置颜色

标签:c   style   a   ext   color   width   

原文地址:http://www.cnblogs.com/xuxin-1989/p/3765243.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!