创建针对.net 4.5.1的winform项目
安装-打包PropertyChanged.Fody
[ImplementPropertyChanged]
public class PersonFody
{
public string Name { get; set; }
}
PersonFody _fod = new PersonFody();
_fod. //Name is the only property and no events to subscribe
Is it possible to subscribe to a PropertyChanged event at design time using fody?发布于 2017-02-23 11:36:49
我想现在有点晚了,但是你可以的。只需将此事件添加到您的类中:
public event PropertyChangedEventHandler PropertyChanged;Fody将识别出您拥有IPropertyChanged接口的正确事件,并连接所有属性来触发该事件。
https://stackoverflow.com/questions/35876338
复制相似问题