Windows Phone 7 charting using the Silverlight 3 Control Toolkit


image

The article will show you the steps to surface charting data visualizations using the Silverlight Control Toolkit on the Windows Phone 7.

Steps to Get Silverlight Control Toolkit Data Visualizations to Work in Windows Phone 7

  1. Download the November 2009 Silverlight 3 Control Toolkit (http://silverlight.codeplex.com/releases/view/36060#DownloadId=93512)
    • The April 2010 Silverlight Control Toolkit dropped support for Silverlight 3.  The November 2009 release is the latest stable release for Silverlight 3.
  2. Create a new Windows Phone 7 project
  3. Add a reference to the System.Windows.Controls.DataVisualization.Toolkit.dll
    • Ensure the DLL comes from the Silverlight 3 toolkit (November 2009) NOT the Silverlight 4 toolkit
    • The default location is: C:\Program Files (x86)\Microsoft SDKs\Silverlight\v3.0\Toolkit\Nov09\Bin\System.Windows.Controls.DataVisualization.Toolkit.dll
  4. Add a reference to the System.Windows.Controls.dll
    • Ensure the DLL comes from the Silverlight 3 client SDK
    • The default location is: C:\Program Files (x86)\Microsoft SDKs\Silverlight\v3.0\Libraries\Client\System.Windows.Control.dll
  5. Drag over chart and series from Asset library; start using the chart data visualizations normally
    • I have tested pie, line and bar charts and all seem to work nicely

Read more here

Advertisements

One thought on “Windows Phone 7 charting using the Silverlight 3 Control Toolkit

  1. Great article, but I was wondering if you might know what’s up with this.
    I’m using the Visual Basic Toolkit for Windows Phone 7 RTM, and don’t have any problems with it directly.

    However, I’d like to use, say, the accordion control or graph control from the silverlight 3 toolkit as you mention.

    When I add a reference to the applicable dll’s, first I get a warning that adding a reference to a silverlight control could be problematic, which is odd.

    But then, the controls DO show up in the toolbox, but they are disabled. Can’t drag them to a windows phone layout xaml.

    However, when I open your test C# project, it’s the same story. If I load your project in Blend, I can see teh controls in the ASSET tab, and add them to the xaml just fine, but when I open my VB project in blend, the project opens, but the xaml just shows as text, no GUI designer, and I see nothing in the ASSET tab.

    So…. I create an accordion control in YOUR project xaml in blend, copy the namespace and xaml code over to my project, and lo an behold, I get the controls, and they all seem, to work just fine, even when run on the emulator.

    So I was wondering if you had any idea whether I have something wrong with my VB project or whether this was all just a limitation of the initial VB for WinPhone toolkit?

    Thanks again for the article!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s