Welcome to MSDN Blogs Sign in | Join | Help

Another round of (un)support [Quick fix for the unofficial WPF Charting assembly!]

When I updated my ChartBuilder sample/application/learning tool for the March 09 release of the Silverlight Toolkit a few weeks ago, I included an unofficial build of the Silverlight Charting assembly for WPF. Despite my warning that WPF Charting was completely untested, I nevertheless hoped that some of you would give WPF Charting a try - and you didn't let me down. :) Two significant WPF-only issues came up pretty quickly, and I responded by fixing them and publishing an updated build of the WPF Charting assembly - along with sharing the files and steps for anyone to build the WPF Charting assembly themselves!

Things were pretty quiet on the WPF Charting front until recently when forum user giggs123 reported seeing an exception when handling the SelectionChanged event of a DataPointSeries class. I investigated and discovered that the WPF-only SelectionChangedEvent was handled incorrectly. :( While SelectionChanged is a normal .NET event on Silverlight (because that's all that's supported), it is a RoutedEvent on WPF. Except that it was hooked up wrong and caused an exception if it was raised when something was listening for it... (Fortunately, handling selection is a relatively uncommon scenario, so this probably wouldn't affect most of you. And, incidentally, the reason I didn't catch it with WPF ChartBuilder is that raising the event works just fine when nothing's listening for it!)

Long story short, I replied on the forum with a simple patch to the code - then went ahead and made the full fix and checked it into our version control system for inclusion with the next release of Charting. I've updated the WPF Charting assembly in the ChartBuilder download to include this fix (along with the previous two), so if you're already playing around with WPF Charting, please take a moment to upgrade to the new version of System.Windows.Controls.DataVisualization.Toolkit.dll from the ChartBuilder download link below. And if you're building WPF Charting for yourself, you'll be happy to know that I've also updated the code in the Controls.DataVisualization.Toolkit.WPF.zip archive to include the latest changes. :)

Again, I'd like to stress that none of these problems is present in Silverlight Charting; they exist only in the unofficially available WPF Charting bits and are there because we did no testing on WPF due to a lack of time or resources. If you don't care about WPF Charting, then none of this matters to you; there are no other changes to the files in the downloads.

Thanks again to everyone who has used WPF Charting and reported issues to us - we appreciate your help and patience!

 

[Please click here to download the complete ChartBuilder source code and the ready-to-use WPF Charting assembly (don't forget to reference WPFToolkit.dll, too).]

[Please click here to download Controls.DataVisualization.Toolkit.WPF.zip to build WPF Charting yourself.]

 

ChartBuilder on WPF
Published Wednesday, April 22, 2009 12:11 AM by Delay
Filed under: ,

Comments

# Another round of (un)support [Quick fix for the unofficial WPF Charting assembly!] - Delay's Blog

Thursday, April 23, 2009 11:40 AM by DotNetShoutout

Thank you for submitting this cool story - Trackback from DotNetShoutout

# re: Another round of (un)support [Quick fix for the unofficial WPF Charting assembly!]

Wednesday, June 03, 2009 5:00 AM by djokalazic

Could you please upload source code again, because the Controls.DataVisualization.Toolkit.WPF.zip is incomplete, many files are missing from solution.

Thanks!

# re: Another round of (un)support [Quick fix for the unofficial WPF Charting assembly!]

Wednesday, June 03, 2009 1:23 PM by Delay

djokalazic,

Please read the following post for details on how to build WPF Charting. The contents of the ZIP you refer to are meant to be combined with the source code for Silverlight Charting from the Silverlight Toolkit and include only those files that are new or changed.

http://blogs.msdn.com/delay/archive/2009/03/26/if-they-can-build-it-they-will-come-enabling-anyone-to-compile-wpf-charting-from-the-silverlight-charting-sources.aspx

Thanks!

Anonymous comments are disabled
 
Page view tracker