绑定:
XYDataSeries vtds = new XYDataSeries()
{
XValueBinding = new Binding("X"),
ValueBinding = new Binding("Y"),
ConnectionStrokeThickness = 2,
ConnectionStroke = new SolidColorBrush(Colors.Red),
};
Chart.Data.Children.Add(vtds);
Chart.Data.ItemsSource = Paras;
Paras是list<point> 类型,我现在清空Paras,然后再次绑定,还是没有清除掉
Paras.clear();
Chart.Dispatcher.Invoke(new System.Action(() =>
{
Chart.Data.ItemsSource = Paras;
})); |