我已经设置了一个属性并实现了INotifyPropertyChanged
像这样......
public event PropertyChangedEventHandler PropertyChanged;
public FlowProcess LastSelectedFlowProcess
{
get { return _lastSelectedFlowProcess; }
set
{
_lastSelectedFlowProcess = value;
Notify("LastSelectedFlowProcess");
UpdateFlows();
}
}
private void Notify(string propName)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propName));
}
我在其他类上使用了这个确切的设置,但由于某些原因,在Notify方法中,PropertyChanged变量返回null .
在其他类中,当这个工作时,PropertyChanged事件不为null并且计算为委托?我在这里错过了什么?
我在课堂上调用公共访问器会有所作为吗?