I have the Feb. 2010 version of WPF Toolkit installed. I need to be able to dynamically add LineSeries to a chart. The following code SHOULD work:
Imports System.Windows.Controls.DataVisualization.Charting Imports System.Collections.ObjectModel Class MainWindow Dim procVal1 As New ObservableCollection(Of KeyValuePair(Of Integer, Double)) Private Sub MainWindow_Initialized(sender As Object, e As System.EventArgs) Handles Me.Initialized procVal1.Add(New KeyValuePair(Of Integer, Double)(1, 410.3)) procVal1.Add(New KeyValuePair(Of Integer, Double)(1, 411.3)) procVal1.Add(New KeyValuePair(Of Integer, Double)(1, 412.3)) Dim mySeries As New System.Windows.Controls.DataVisualization.Charting.LineSeries With mySeries .Title = "1" .DependentValuePath = "Value" .IndependentValuePath = "Key" .ItemsSource = procVal1 .IsSelectionEnabled = True .ItemsSource = procVal1 End With me.LineChart.Series.Add(mySeries) End Sub End Class
While executing the code, when I get to the line that creates the LineSeries object, execution stops with the following error:
No Source Available.
Locating source for 'C:\dd\WPF_1\src\wpf\src\ControlsPack\WPFToolkit\DataVisualization\Charting\Series\LineSeries.cs'. Checksum: MD5 {1b c6 9c 8d 23 3b 86 df 36 1f c1 94 a2 a3 79 66} The file 'C:\dd\WPF_1\src\wpf\src\ControlsPack\WPFToolkit\DataVisualization\Charting\Series\LineSeries.cs' does not exist. Looking in script documents for 'C:\dd\WPF_1\src\wpf\src\ControlsPack\WPFToolkit\DataVisualization\Charting\Series\LineSeries.cs'... Looking in the projects for 'C:\dd\WPF_1\src\wpf\src\ControlsPack\WPFToolkit\DataVisualization\Charting\Series\LineSeries.cs'. The file was not found in a project. Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'... Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'... Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'... Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'... The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\dd\WPF_1\src\wpf\src\ControlsPack\WPFToolkit\DataVisualization\Charting\Series\LineSeries.cs. The debugger could not locate the source file 'C:\dd\WPF_1\src\wpf\src\ControlsPack\WPFToolkit\DataVisualization\Charting\Series\LineSeries.cs'.
There is no LineSeries.cs file that I can find in my PC. I tried uninstalling and re-installing the toolkit. No help. I can still define line series in XAML ok, but need to be able to add them dynamically from code-behind.
Any way to solve this?
Thanks...
Ron Mittelman