Why WPF binding handles INotifyPropertyChanged in two different ways?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 02:32:34

Changing property from UI to ViewModel may lead to deadlock kind of situation which might run into end less recursive calls in two way scenarios. In order to block this from happening, when WPF is making change to model, it will continue to track changes via INotifyPropertyChanged ,but this change will be queued in dispatcher queue, and it will be executed after its current update is finished.

Since the change in viewmodel is not initiated by WPF, WPF will not queue the operation, it will immediately execute the change.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!