views:

484

answers:

2

I have a hierarchy of objects (objects A, B), each of which implements INotifyPropertyChanged such that...

A has a member of type B, B has a member of C, C is of type bool

When C changes, its PropertyChanged event gets fired, however this does not fire B's property changed event. And therefore A does not react to B's change.

Is there a good way to bubble this up?

+1  A: 

What you are looking for is a Routed Event see:-

http://www.silverlightshow.net/items/Routed-Events-in-Silverlight.aspx

AnthonyWJones
A: 

This is great - I have to spend some more time looking at it. Thank you.

I found a different solution but it's a bit of a hack. I just set my binding path property to the nested type. Using my example above, in my xaml (which has a DataContext of object A) I set my binding as...

{Binding Path=B.C}

Bubbling the event up is definitely more elegant.

arch