If I have a member, constructor and method like so
//The injected object exposes a public property of type bool which will raise
//a NotifyPropertyChangedEvent
IInjectedObject _injectedObject;
public someClass(IInjectedObject injectedObject)
{
_injectedObject = injectedObject;
}
public void DoSomething()
{
}
Is there a way to call the method in my class when the property on the injected object changes?
You state that your interface inherits from INotifyPropertyChanged, so it can reasonably be expected to notify listeners of property changes through the “PropertyChanged” event. Assuming something like this:
Then, your dependant object must listen for the
INotifyPropertyChanged.PropertyChangedevent: