开发者

silverlight receive INotifyPropertyChanged in non UI class hook

I've a class that raises INotifyPropertyChanged events. I'm quite happy with databinding to UI controls, but I'd like to get these events fired into a non-UI class, but am unsure of what to register or hook into.

I know it should be simple, and it probably is, I'm just after a quick pointer down 开发者_StackOverflowthis road.

Many Thanks

Paul


I may be misunderstanding you, but can't you just use the public event in INotifyProperyChanged to do what you want to do?

MyClassInstance.PropertyChanged += (sender, e) =>
{
     if (e.PropertyName == "MyProperty")
     {
          // do something
     }
};
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜