Showing lines with different colors on a Silverlight Toolkit’s LineChart?

为君一笑 提交于 2019-12-04 19:31:52

All this Silverlight Charting is poorly/randomly documented.

Beware StylePalette has been dropped in Silverlight4 and new mechanism & chart types released which is/are more consistent with other objects

Zoltan Veres

The problem was I had a style which was overriding the Background color of the lines. The solution was to set all the styles from code behind.

Style style = new Style(typeof(Control));
style.Setters.Add(new Setter(Control.BackgroundProperty, new SolidColorBrush(oColors[colors])));
style.Setters.Add(new Setter(Control.HeightProperty, 5));
style.Setters.Add(new Setter(Control.WidthProperty, 5));
series.DataPointStyle = style;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!