Binding到DataGrid的时候,需要用到ObservableCollection.
public ObservableCollection<Customer> Customers { get { return this.customers; } set { this.customers = value; base.OnPropertyChanged("Customers"); } }
(WPF) MVVM: DataGrid Binding,布布扣,bubuko.com
原文:http://www.cnblogs.com/fdyang/p/3871808.html