Microsoft Client Continuum in action: The Silverlight toolkit charts, running in WPF


The Silverlight toolkit CTP released at PDC includes some new charting functionality  (Column, Bar, Pie, Line, and Scatter).   
The long-term plan is for all of these controls to be ported to WPF; but inspired by Rudi’s work on porting the themes, I peeked into the task to see if the Microsoft continuum would hold for the controls too.

The results were darn good, I had the charts project compiled in WPF in ~20 mins; and after that, I only had to make a few run-time tweaks to get the project running… ( look for the #WPF  pre-processor in the code..   there is only a handful).

Since the charting library is an early "preview" quality, I will probably not do a full port or any testing, but in case some one wants to carry it further, the source code is here..  

Screenshot follows…  These are the same charts as in the SL Toolkit sample but running in a WPF app (named Window1 for Rob)..

WPFSLCharts

Comments (17)

  1. Rudi Grobler says:

    The WPF Themes CodePlex project has been updated, 4 Themes and 2 new controls were added!!! Controls

  2. Anonymous says:

    Microsoft released to CodePlex a series of Silverlight controls that allows for theming of sites and included several themes and some great charting examples. In the long term these were to be ported to WPF but not right away, well we have some good news

  3. In his recent blog post , Jaime took a stab at running the charting controls in the SilverLight ToolKit

  4. WPF Controls Jaime Rodriguez – Jaime did a quick port of the Chart controls from the Silverlight Toolkit

  5. Jaykul says:

    This isn’t ready yet, really … but I thought I’d give you a little preview of why this is exciting to *me*: http://huddledmasses.org/images/PoshConsole/Out-Graph.png

  6. klaatu says:

    Brilliant – these are just what I need for my weather software – many thanks!

    Steve

  7. I’ve been catching up on my blog reading…interesting stuff I came across; PNRP in Windows 7 being…

  8. snovik says:

    hi,

    could someone please guide me on how I can use this in my WPF project? I added an existing project to DataVisualisation but the project can not compile with an error in Axes.cs and then:

    Error 2 Unknown build error, ‘The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)’

  9. JaimeRodriguez says:

    snovik,  

    Can you share more details on the compiler error you got on axes.cs?

    The library requires VS 2008 SP1,  .NET Framework 3.5 SP1 and the WPF Toolkit (from codeplex.com/wpf) .. Did you have all that installed?  

    As I did mention, the SL charts are still at Preview, and the port I did was trivially simplistic, so I would not expect many people to leverage this "as is" on a real project ..

  10. snovik says:

    hi

    what info do you need? I tried on VS2008 Team Edition, SP1, .NET 3.5 SP1, WinXP

    I do have WPF toolkit installed and downloaded your modified SL toolkit. I simply added DataVisualisation to my existing project and tried to compile.

  11. snovik says:

    however when I open your project alone, it does compile

    so can I simple add Controls.DataVisualization project to another one? Is it self-sufficient?

  12. ripura says:

    I am not sure how I should use this in my project. The source code that you have given does not compile in my machine.

  13. JaimeRodriguez says:

    ripura & snovik,

    I think I figure it out (thanks to Charlie).  

    I was missing a #if  that caused a problem on the original silverlight files. In my configuration Manager, I have those projects not building, so I missed it..   I just uploaded a new zip file that has the fix..  

    Sorry about that 🙁 …

  14. snovik says:

    Unfortunately my original problem still stay:

    could someone please guide me on how I can use this in my WPF project? I added an existing project to DataVisualization but the project can not compile with an error in Axes.cs and then:

    Error 2 Unknown build error, ‘The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)’

    How can I use only DataVisualization assembly? I added the project but it still does not work

  15. pnelson786 says:

    It works fine for me.

    Add reference to dll build from CControls project (WPF project)  and not original ‘Controls.DataVisualization’ silverlight project and it should work fine.

    To Jamie,

    Thanks so much for porting datavisualization toolkit to WPF.

    Do you have latest Silverlight December 2008 toolkit ported for WPF too ? Looking forward to it.

  16. snovik says:

    I added dll from CControls and this simple xaml:

    <charting:Chart Title="Prices">

    <charting:Chart.Series>

    <charting:LineSeries ItemsSource="{Binding prices}"

    IndependentValueBinding="{Binding Date}"

    DependentValueBinding="{Binding Value}" />

    </charting:Chart.Series>

    </charting:Chart>

    the same collection is bound to DataGrid and it works fine. However now I get an exception with the following text

    Could not load file or assembly ‘WPFToolkit, Version=3.5.31016.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)