现在的位置: 首页 > 综合 > 正文

silverlight chart设置折线图颜色

2013年04月09日 ⁄ 综合 ⁄ 共 717字 ⁄ 字号 评论关闭

 Style dataPointStyle = new System.Windows.Style(); 
         dataPointStyle.TargetType = typeof(System.Windows.Controls.Control); 
 
            Style LegendStyle = new System.Windows.Style(); 
            LegendStyle.TargetType = typeof(System.Windows.Controls.Control); 
 
           Setter setterDataRed = new Setter(System.Windows.Controls.Control.BackgroundProperty, new SolidColorBrush(Colors.Red)); 

            Setter setterLegendRed = new Setter(System.Windows.Controls.Control.BackgroundProperty, new SolidColorBrush(Colors.Red)); 

 
            dataPointStyle.Setters.Add(setterDataRed); 
           LegendStyle.Setters.Add(setterLegendRed);
           lineSeries11.DataPointStyle = dataPointStyle;
           lineSeries11.LegendItemStyle = LegendStyle; 

抱歉!评论已关闭.