Get an anchor target from a source?

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

The WaypointItem is our source of binding for each line, but is there any magic way to get a link to all the bindings of objects (goals) to this class from WaypointItem code?

Thanks Jason

+3
source share
1 answer

There might be something useful in the BindingOperations class . Unfortunately, the purpose of the binding is probably actually the DataContext of the host element (if I understand your description correctly), which means that your WaypointItem probably cannot determine what might be binding to it.

One of the few features that can be installed on the wall is the implementation of a custom IValueConverter that notifies your WaypointItem via a well-defined interface that has been associated with something. He will send this notification with every update, so you will need to handle it accordingly.

+1
source

Source: https://habr.com/ru/post/1739514/


All Articles