ObservableCollection クラスに問題があります。私はこれを解決することはできません。
using System.Collections.ObjectModel;
#region ViewModelProperty: CustomerList
private ObservableCollection<T> _customerList = new ObservableCollection<T>();
public ObservableCollection<T> CustomerList
{
get
{
return _customerList;
}
set
{
_customerList = value;
OnPropertyChanged("CustomerList");
}
}
#endregion
ObservableCollection を持つ私のクラスは、ViewModelBase を継承します。
public abstract class ViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
}
どこに問題がありますか?