There is a chart of chartingToolkit: Chart and there is a line with chartingToolkit: LineSeries points on it. Question: how is it possible, depending on the value of the object of the collection attached to the ItemSource, to color the dots in different colors (black and red)? Code and screenshot below.
<chartingToolkit:Chart x:Name="Chart1" Title="{x:Static helper:UIHelper.KartaX}" MinHeight="205" > <chartingToolkit:Chart.LegendStyle> <Style TargetType="visualizationToolkit:Legend"> <Setter Property="Width" Value="0" /> </Style> </chartingToolkit:Chart.LegendStyle> <chartingToolkit:Chart.TitleStyle> <Style TargetType="visualizationToolkit:Title"> <Setter Property="Margin" Value="0,0,0,-10" /> <Setter Property="HorizontalAlignment" Value="Center" /> </Style> </chartingToolkit:Chart.TitleStyle> <chartingToolkit:Chart.Axes > <chartingToolkit:LinearAxis Orientation="x" Minimum="{Binding MinRange}" Maximum="{Binding MaxRange}" Interval="1"/> <chartingToolkit:LinearAxis Orientation="Y" Minimum="{Binding MinXY}" Maximum="{Binding MaxXY}" /> </chartingToolkit:Chart.Axes> <chartingToolkit:LineSeries ItemsSource="{Binding ChartDetailList}" IndependentValuePath="SampleId" DependentValuePath="XMeasure" > <chartingToolkit:LineSeries.LegendItemStyle > <Style TargetType="{x:Type chartingToolkit:LegendItem}"> <Setter Property="Visibility" Value="Collapsed"/> </Style> </chartingToolkit:LineSeries.LegendItemStyle> <chartingToolkit:LineSeries.DataPointStyle> <Style TargetType="chartingToolkit:LineDataPoint"> <Setter Property="Foreground" Value="Red"/> <Setter Property="Background" Value="Black"/> <Setter Property="Opacity" Value="10" /> </Style> </chartingToolkit:LineSeries.DataPointStyle> </chartingToolkit:LineSeries> </chartingToolkit:Chart> 