0
Under review
Switching PlotModel in RunTIme
Hello,
After binding to a certain instance of PlotModel I'm trying to switch a plot model in run time.
In other words, I assign a new created PlotModel to the same variable that was used with the UI control. However, the graph control doesn't seems to adjust (and I do call InvalidatePlot(true)).
To be more specific,
<oxy:Plot Model="{Binding Models.MyGraphSwitcher1.MyPlotModel}" />
"MyPlotModel" above is a "OxyPlot.PlotModel" and it is changed by the ViewModel - "MyGraphSwitcher1". The problem is that when "MyPlotModel" is set to point to a new PlotModel instance the UI control is not updated. I believe it has to do with the bindings.
I wonder if there is some way to make this work?
Thanks,
Mike
After binding to a certain instance of PlotModel I'm trying to switch a plot model in run time.
In other words, I assign a new created PlotModel to the same variable that was used with the UI control. However, the graph control doesn't seems to adjust (and I do call InvalidatePlot(true)).
To be more specific,
<oxy:Plot Model="{Binding Models.MyGraphSwitcher1.MyPlotModel}" />
"MyPlotModel" above is a "OxyPlot.PlotModel" and it is changed by the ViewModel - "MyGraphSwitcher1". The problem is that when "MyPlotModel" is set to point to a new PlotModel instance the UI control is not updated. I believe it has to do with the bindings.
I wonder if there is some way to make this work?
Thanks,
Mike
0
Under review
Oystein Bjorke 10 years ago
WPF? Are you implementing INotifyPropertyChanged? Can you provide a simple example project that reproduces the error? Then we can add a bug in the GitHub issues!
Customer support service by UserEcho