How to avoid PlotModel being affected by different RenderContext

Oystein Bjorke 10 ár síðan 0
This discussion was imported from CodePlex

heromyth wrote at 2011-10-20 04:53:

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.


objo wrote at 2011-10-20 08:03:

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.