What exactly WPF runtime does after raising the PropertyChanged event of INotifyPropertyChanged interface

StackOverflow https://stackoverflow.com/questions/17859454

문제

I have been asked this question in an interview

"When we want to reflect the changed value of a propery on the view when some updates the binded propery in backend in ViewModel, then we generally raise the event which is given by implementing INofityPropertyChanged interface."

"So, question is this we dont bind any event handler to propertychanged event, it is the wpf run time that does it. So, what exactly happens right after raising the propertychanged event from ViewModel.

올바른 솔루션이 없습니다

다른 팁

In WPF, Dispatcher handles most(maybe all) UI work items in loops, like queues. Different work items have different priorities so that Dispatcher can handle some items with very high priority in time.

Raising a property changed event will transfer to a data binding task and will be put in Dispatcher's queue with DataBinding priority. Dispatcher will manage the item's position inside the queue and execute it, which is to update data binding here, at an appropriate time.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top