michaellperry/UpdateControls — pull request #10 by robertvazan (2014-06-25 18:02:26+00:00)
Title: Removed NotificationGate

NotificationGate silences OneWayToSource bindings and possibly impacts other legitimate binding scenarios. The problem develops as follows:

1. DataContext binding refers to property that gets invalidated.
2. Invalidated property fires PropertyChanged event that triggers DataContext refresh within WPF. This event is fired with NotificationGate blocking callbacks.
3. DataContext refreshes its binding and now all bindings in descendant controls get notified.
4. OneWayToSource binding gets notified of the change in its DataContext and tries to write some initial value to its target.
5. UpdateControls receives write from OneWayToSource binding and silently ignores it, because we are still within the PropertyChanged event with blocked NotificationGate.

That's the scenario I have discovered. I might have messed up some details. I was debugging it some time ago. I think other circumstances might cause problems too, but I didn't explore it any further.

I don't see how to fix NotificationGate, so I just removed it. The core function of NotificationGate is to prevent GUI updates from reaching view models, which is IMO flawed design from its inception. It will inevitably interfere with binding.