I have a windows phone 7.1 project that I want to create a chart in using the silverlight 5.0 chart control. I've installed the December 2011 version of the Silverlight Toolkit. No other versions exist on my computer. When I try to set a reference to the the System.Windows.Controls.DataVisualization.Toolkit.dll that is located in C:\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Toolkit\dec11 an error message occurs. The message says "A higher reference version or incompatable assembly cannot be added to the project." I'm using Visual Studio 2010 and the Target Windows Phone OS version is set to Windows Phone OS 7.1 which is the usual reason I've seen for this error message. Does anybody know how to resolve this?
1 Answers
2
votes
Make sure you have the right toolkit.
WP7 Toolkit
You Cannot use the Silverlight 5 Toolkit in a WP7 application
After that its pretty simple:
- Add the dll to the project as a reference.
In any XAML you want to use the items place a declaration (Just to name a few)
xmlns:toolkit="clr-namespace:System.Windows.Controls assembly=System.Windows.Controls.Toolkit" xmlns:customControl="clr-namespace:TriviaGame.CustomControls;assembly=TriviaGame.CustomControls" xmlns:visualizationToolkit="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit" xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"