[英]How to bind two scatter charts in WPF (MVVM, ViewModel-First)?
How to bind scatter series points from one window to another window having same scatter chart at runtime? 如何在运行时将散点系列点从一个窗口绑定到具有相同散点图的另一个窗口?
I have a resulted scatter chart points in one window, and I want to perform different operation on the same points in another window. 我在一个窗口中有一个散点图结果点,并且我想在另一窗口中的相同点上执行不同的操作。
thanks in advance 提前致谢
If you are using MVVM, you can bind the source of your scatter charts to a property in a viewmodel/class. 如果使用的是MVVM,则可以将散点图的源绑定到视图模型/类中的属性。
For example: 例如:
private Series _plotVariable;
public Series PlotVariable
{
get
{
return _plotVariable;
}
set
{
_plotVariable = value;
}
}
If you bind the source of your scatter charts to PlotVariable, when your class sets the value of _plotVariable, the scatter charts will update. 如果您将散点图的源绑定到PlotVariable,则当您的类设置_plotVariable的值时,散点图将更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.