I am writing a MarkupExtension capable of accepting a PropertyPath. I would like to subscribe to the βChangeβ events of this PropertyPath (either DependencyProperty, or one that is updated through INotifyPropertyChanged) without ever actually calling the source property.
My code looks like this:
public override object ProvideValue(IServiceProvider serviceProvider) { var binding = new Binding(); binding.Path = Path; ... return false; }
But I'm not sure how to continue to receive notifications from the binding object. If I contact the binding to any DependencyProperty, it will automatically call the getter property of the source, which I am trying to avoid.
It seems that I could somehow use Binding.SourceUpdatedEvent, however, since this is an attached routed event, I am not sure how to subscribe to it from MarkupExtension.
Thanks!
Vitalyb
source share