Tag: datapoint oxyplot

另一个“对象不包含X的定义”

我看到了很多关于这个问题的主题: “对象不包含X的定义,并且没有扩展方法X接受Object类型的第一个参数” 但他们都没有解决我的问题。 情况:我想保存3个系列的DataPoints。 因此我制作了一个包含该系列的列表: List filesToBeStored; public OxyPlot.Series.DataPointSeries saveAnalyseBSITotal; public OxyPlot.Series.DataPointSeries saveAnalyseSBSI; public OxyPlot.Series.DataPointSeries saveAnalyseTBSI; 在Form.cs中,我调用SaveFile(…): for (int i = 0; i < plotSBSIBandsA.Model.Series.Count; i++) { OxyPlot.Series.DataPointSeries sA = (plotSBSIBandsA.Model.Series[i] as OxyPlot.Series.DataPointSeries); OxyPlot.Series.DataPointSeries sB = (plotSBSIBandsB.Model.Series[i] as OxyPlot.Series.DataPointSeries); sB.Points.Clear(); for (int j = 0; j < sA.Points.Count; j++) { sB.Points.Add(new OxyPlot.DataPoint(sA.Points[j].X, sA.Points[j].Y)); } } […]