Error of WPF Teechart - RenderDataDrawingContext

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
MVUser6
Newbie
Newbie
Posts: 30
Joined: Wed Jul 11, 2012 12:00 am

Error of WPF Teechart - RenderDataDrawingContext

Post by MVUser6 » Tue Aug 21, 2012 3:00 pm

Hi,

i'm calling the function TeeChart.Export.Image.SVG.Save.
the function causes the chart to redraw and call after draw.

in the afterdraw i'm using the canvas to draw lines and text. on the drawing line i got an exception:

Cannot access a disposed object.
Object name: 'RenderDataDrawingContext'.

Stack Trace:

at System.Windows.Media.RenderDataDrawingContext.VerifyApiNonstructuralChange()
at System.Windows.Media.DrawingContext.DrawText(FormattedText formattedText, Point origin)
at Steema.TeeChart.WPF.Drawing.Graphics3DWPF.DoDrawString(Double x, Double y, String text, ChartBrush aBrush)
at Steema.TeeChart.WPF.Drawing.Graphics3D.TextOut(ChartFont f, Double x, Double y, String text)
at Steema.TeeChart.WPF.Drawing.Graphics3D.TextOut(Double x, Double y, String text)

what i did wrong?

thanks

MVUser6
Newbie
Newbie
Posts: 30
Joined: Wed Jul 11, 2012 12:00 am

Re: Error of WPF Teechart - RenderDataDrawingContext

Post by MVUser6 » Wed Aug 22, 2012 6:41 am

hi

i found the problem - i saved a reference to the canvas, when i changed it back to TeeChart.Graphics3d the error was fixed.
it seems there is sometimes a new canvas, in contrast to the winforms teechart.

Post Reply