更新时间:2023-09-18 20:05:10
在设置新值之前,您必须使ItemSource为空:
You have to null the ItemSource just before you set the new value:
ctlList.ItemsSource = null;
ctlList.ItemsSource = YourObjects;
我建议使用DataContext和Binding代替您的解决方案:
I recommand to use DataContext and Binding instead of your solution:
http://www.codeproject.com/Articles/30905/WPF-DataGrid-Practical-Examples