I have a binding that works. The GUI updates.
<DataGridTextColumn Binding="{Binding Path=Value,
NotifyOnTargetUpdated=True,
NotifyOnSourceUpdated=True,
Mode=OneWay}"/>
The binding source object implements INotifyPropertyChanged and the binding property is a normal clr property.
The Binding.TargetUpdated
event fires, but not the Binding.SourceUpdated
event.
For example, the following works
<EventTrigger RoutedEvent="Binding.TargetUpdated"> ...
but
<EventTrigger RoutedEvent="Binding.SourceUpdated"> ...
does not.
It makes no difference if I create the binding in code or XAML, use EventTrigger
in the Triggers
collection or an EventSetter
. As far as I can tell the event is just not firing.
Does anyone know how to make Binding.SourceUpdated
fire?
Could it be that 'TargetUpdated' is fired when the source changes and 'SourceUpdated' is fired when the target changes?
(@black-stallion gave me a hint to what might be going on, but I'm hoping people will comment / edit if this is correct or incorrect!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With