Profile Picture

Nevron Chart in WPF WindowsFormsHost in Modal Dialog halts wpf rendering

Posted By Matt Chapman 14 Years Ago

Nevron Chart in WPF WindowsFormsHost in Modal Dialog halts wpf...

Author
Message
Matt Chapman
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 3, Visits: 1
I am using Nevron Charts hosted in WindowsFormsHost in WPF.

Normally this works fine but in a modal dialog the Nevron Chart stops the correct rendering of the surrounding wpf controls.
We have several examples of this happening, not just related to a single form.

We are currently using .net 4.0 although this behaviour was also present in .net 3.5sp1.

Currently on Nevron 2008 Q3.

Is this a known issue, and if so, is it fixed in a newer version of Nevron Chart?

Attached are screenshots of the page in question rendered badly (looks like animation has halted 1 frame early)
and the page rendered correctly, which can be achieved either by dragging the window off the screen and back or by altering the window size.

thanks

Attachments
Good Render.jpg (201 views, 83.00 KB)
Bad Render.jpg (202 views, 100.00 KB)
Milen Metodiev
Posted 14 Years Ago
View Quick Profile
Forum Member

Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)

Group: Nevron Team
Last Active: 14 Years Ago
Posts: 48, Visits: 1

Hello Matt,

This is not a known issue. Can you please send an example that reproduces the problem to our support e-mail?

Best Regards,
Milen



Andrew Jones
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 4, Visits: 1

I'm trying to use Chart in a WPF 4 app also. What xmlns did you have to include? Also what dll's did you have to reference?

If you could provide a quick example that would be fantastic.

Andrew



bob milanov
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

Hi Andrew,

The following xaml will do the job:

<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:nevronchart="clr-namespace:Nevron.Chart.WinForm;assembly=Nevron.Chart.WinForm"
Title="Window1" Height="300" Width="300">
<Grid>
<wfi:WindowsFormsHost Width="250" Height="150">
<nevronchart:NChartControl Name="nChartControl1" />
</wfi:WindowsFormsHost>
</Grid>
</Window>

You'll have to add the following assemblies as references to your project:

WindowsFormsIntegration
System.Windows.Forms
Nevron.Chart
Nevron.Chart.WinForm
Nevron.GraphicsGL
Nevron.Presentation
Nevron.System

Best regards,
Bob



Andrew Jones
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 4, Visits: 1

Bob,

I'm getting an error with that code:-

Error 15 The tag 'NChartControl' does not exist in XML namespace 'clr-namespace:Nevron.Chart.WinForm;assembly=Nevron.Chart.WinForm'.

Any ideas?



Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Andrew,

Please send a project replicating the problem to support@nevron.com. Also did you include the Nevron.Chart.WinForm.dll as a reference to the project?

 



Best Regards,
Nevron Support Team



Andrew Jones
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 4, Visits: 1

I think I've worked it out. If the target framework is set to ".NET Framework 4 Client Profile" (which is now the default for WPF 4 apps) it does not work. Changing the Target framework to ".NET Framework 4" allows it to work.

Andrew



Jeremy Kolpak
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 4, Visits: 1
I was curious if there was ever a follow up and answer to the original poster's question. I am running into something similar where I have a WinForms project that has a WPF control (in an ElementHost) that in turn hosts a nevron chart. This leads to a situation where not all of the WPF components are properly rendering as the original poster was seeing. Thanks!

~Jeremy

Matt Chapman
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 3, Visits: 1
Hi Jeremy

I did get a reply from Nevron to say that it was not a known issue and they would investigate, but to try using
ChartControl.Settings.RenderSurface = Nevron.GraphicsCore.RenderSurface.Window; in the mean time.

I don't know if the issue actually got fixed in a later version.

The workaround I came up with as to host the nevron chart in a Winform (real one, not on-the-fly, not sure if this was relevant) then host the winform in a WindowsFormsHost rather than putting the Nevron Chart into a WindowsFormsHost directly. This seems to prevent he issue.
Sorry for sketchy detail nut I haven't looked at this for a year.

Matt



Similar Topics


Reading This Topic