PropertyChangedEventArgs -> Old Value, New Value, PropertyOwner


I try to get more Informations over PropertyChangedEventArgs but cant figure it out how…


Is there a way to get more Informations from the PropertyChangedEvent?

Thank you

Basically, what you see is what you get. If property name is all you can see, then I’m afraid that is all there is. Which info do you think is missing?

You can try casting the sender to IProperty and from there get the new value, owner etc. but not the previous value. The previous values you would need to store yourself in e.g. a Dictionary<IProperty, object>.
Note that its not guaranteed that the sender implements IProperty, though.

@TSy: I already do the cast to IProperty! --> Unfortunatly I have no way found to get the properties owner over it. How you do this?



The object that implements the IPropertyContainer is usually also the logical “parent” object of the property such as ISimComponent.

So take IProperty.Container and try to cast it to expected type(s).

var component = property.Container as ISimComponent;
if (component != null) 
// Do something with the component.