Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Binding.SourceUpdated not firing

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?

like image 322
Zero Avatar asked May 28 '12 11:05

Zero


1 Answers

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!)

like image 120
Zero Avatar answered Sep 27 '22 16:09

Zero