NullReferenceException calling NWpfChartControlView.RecalcLayout


https://www.nevron.com/Forum/Topic12161.aspx
Print Topic | Close Window

By Michael Krüllmann - 7 Years Ago
Hello,

I am trying to implement a chart using the NGridSurfaceVerticalCrossSectionU chart from the 'Nevron.Examples.Chart.Wpf.VS2015' example suite as a template.
For the first step I just copied most of the code into my own solution.
But different to the example I declared the NVChartControl within the XAML-declaration of my chart and the FillData method is implemented using my own data.
My problem is that within the Create-method the call of "nChartControl1.View.RecalcLayout()" causes a NullReferenceException  whereas in the example it does not.
Unfortunatly the debugger gives no information which object is NULL. nNChartControl1 and its view are not null. The only valuable information is that the exception occurs within the Nevron.Chart.dll.
I tried out several modifications (i.e. call Create from a button-click-handler to be sure that the window hosting the chart has been completly created, let FillData() do nothing, running my own app with admin rights), but nothing helped.
I also examined which Nevron-Dlls are loaded in my application and in the example suite. They are the same and loaded from the GAC.
I hope you can give me some advise what may go wrong.

Thank you in advance,
Michael


By Nevron Support - 7 Years Ago
Hi Michael,

Can you post an example project that replicates this problem? Probably it's something simple to fix and if so we can publish a SP very quickly.
By Michael Krüllmann - 7 Years Ago
Hi,

thank you for the quick response.
See the example project in the attachment.

Best regards,
Michael
By Nevron Support - 7 Years Ago
Hi Michael,
Just a short note that the newest version of the controls that we published today fixes this problem. You can download it from our website. Thank you for reporting this problem.