我有以下使用 Fody.PropertyChanged 编织的类:
[ImplementPropertyChanged]
public class OtherClass : INotifyPropertyChanged
{
#pragma warning disable 67
public event PropertyChangedEventHandler PropertyChanged;
#pragma warning restore 67
public int SomeValue { get; set; }
}
[ImplementPropertyChanged]
public class MyClass : INotifyPropertyChanged
{
#pragma warning disable 67
public event PropertyChangedEventHandler PropertyChanged;
#pragma warning restore 67
public string SomeText { get; set; }
public BindingList<OtherClass> Others { get; private set; }
public MyClass ()
{
Others = new BindingList<OtherClass>();
}
}
从使用MyClass的类中,我没有收到PropertyChanged事件。
这里有什么问题?