How do I change the colors of each line in xaml for the silverlight 4 toolkit chart? I have seen a lot of code behind tricks, but I do not want to do that. Is there a way to do it using mvvm? I would prefer to do it in xaml.
This is what I have tried:
<toolkit:Chart Grid.Row="1" Title="Actuals + Forecast" DataContext="{Binding Path=SelectedSKU}">
<toolkit:Chart.Series>
<toolkit:LineSeries Title="Manual Forecast"
ItemsSource="{Binding Path=LstChartData}"
IndependentValueBinding="{Binding Path=StrPeriod}"
DependentValueBinding="{Binding Path=DQuantity}" BorderBrush="#FFFF0300"/>
<toolkit:LineSeries Title="Automatically Generated Forecast"
ItemsSource="{Binding Path=LstAChartData}"
IndependentValueBinding="{Binding Path=StrPeriod}"
DependentValueBinding="{Binding Path=DQuantity}" Foreground="Green"BorderBrush="Green" />
<toolkit:LineSeries Title="Actual History"
ItemsSource="{Binding Path=LstMChartData}"
IndependentValueBinding="{Binding Path=StrPeriod}"
DependentValueBinding="{Binding Path=DQuantity}" Foreground="Blue" />
</toolkit:Chart.Series>
</toolkit:Chart>
I saw this article: http://blogs.msdn.com/b/delay/archive/2009/02/04/columns-of-a-different-color-customizing-the-appearance-of-silverlight-charts-with-re-templating-and-mvvm.aspx , but it says Silverlight 2. I hear it is completely different than Silverlight 4.