Error: This PlotModel is already in use by some other PlotView control

故事扮演 提交于 2019-12-24 02:31:41

问题


I have two tabs that is bind to one viewmodel which contain a PlotModel of oxyplot and view model selected through a DataTemplate. When click on the first tab the viewmodel was bind properly but when switch to second tab above exception defined in title throw. All of control is same in two tab. Is it possible bind one object to two controls?


回答1:


I know what problem you are facing, as I had faced it myself. Oxyplot does not let you bind one model to two plots.

The reason: Once you assign a PlotModel to a Plotview, it becomes encapsulated in that PlotView object.

The only way you can solve the problem is to create separate PlotModel for each PlotView.



来源:https://stackoverflow.com/questions/25833524/error-this-plotmodel-is-already-in-use-by-some-other-plotview-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!