views:

51

answers:

1

I have a ListView whose ItemsSource is bound to an ObservableCollection. The collection is filled with "WaypointItem" objects (a small class we defined with the info for the listview).

The WaypointItem is our binding source for each row, but is there any magic way to get a reference to all objects (targets) binding to this class from within the WaypointItem code?

Thanks jason

A: 

There might be something helpful in the BindingOperations class. Unfortunately the Target of the binding is probably actually the DataContext of the item presenter (if I understand your description correctly), which means your WaypointItem probably can't tell what may be binding to it.

One slightly off-the-wall possibility would be to implement a custom IValueConverter that notifies your WaypointItem through a well-defined interface that it has been bound to something. It would send this notification on every update, so you would need to handle that appropriately.

Dan Bryant
Thanks for the info guys! I was just being lazy, with a bit more code I have no need to reverse these bindings anymore.
Jason