Page 1 of 1

Error of WPF Teechart - RenderDataDrawingContext

Posted: Tue Aug 21, 2012 3:00 pm
by 15662946
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

Re: Error of WPF Teechart - RenderDataDrawingContext

Posted: Wed Aug 22, 2012 6:41 am
by 15662946
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.