How to avoid PlotModel being affected by different RenderContext

Oct 20, 2011 at 2:53 AM

It seems that The Render(IRenderContext rc) for the PlotModel will change the PlotModel accord to the different RenderContext.

For example, I have a OxyPlot in a winform. Now, I export it to a PNG or PDF which have different size with the winform.
Then, the looking of the OxyPlot in the winform will also be changed.

To solve it, all can be thinked of by me are clone the PlotModel, and render a new PlotModel in another RenderContext.

How about this?

Thanks.

Coordinator
Oct 20, 2011 at 6:03 AM

You are right, the PlotModel contains a lot of render specific data. It should only be used in one plot control. 

It should be possible to print the PlotModel of a control, you should just make sure the control is updated after printing.