Zero
Zero

Reputation: 12099

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?

Upvotes: 8

Views: 7104

Answers (1)

Zero
Zero

Reputation: 12099

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

Upvotes: 9

Related Questions