This question is locked. New answers and comments are not allowed.
I'm having a problem when using DefaultVisualStyle on a BarSeries. I'm using the following code:
Initially the style works correctly, however when I remove a series with a smaller index from the chart the bar reverts back to the standard palette colors i.e. if I set the style to a bar series at index 3 and remove the series at index 1 the bar color changes when it should stay the same.
Style style =
new
Style(
typeof
(Border));
style.Setters.Add(
new
Setter(Border.BackgroundProperty, brush));
Series.DefaultVisualStyle = style;
Initially the style works correctly, however when I remove a series with a smaller index from the chart the bar reverts back to the standard palette colors i.e. if I set the style to a bar series at index 3 and remove the series at index 1 the bar color changes when it should stay the same.