I have a custom ChartPalette for my chart which I add series to from the cs file. I am applying a custom TrackInfo template from the cs file using the following code:
string templateName = "TrackInfoTemplate";
var
template = this.Resources[templateName] as DataTemplate;
ChartTrackBallBehavior.SetTrackInfoTemplate(IllustrationChart.Series[IllustrationChart.Series.Count - 1], template);
My template looks like the following:
<DataTemplate x:Key="TrackInfoTemplate">
<StackPanel Background="LightGray">
<TextBlock Margin="4" Text="{Binding Series.LegendTitle}" FontSize="11" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding DataPoint.Value, Converter={StaticResource ChartLegendConverter}}" FontSize="10" Margin="10 0 0 0" Foreground="Black"/>
</StackPanel>
</DataTemplate>
How can I set the Foreground color of the textblock bound to the Series.Lengend title to match the color of the series itself?