My issue is I have three properties with mutually dependent in my WPF application. I have implemented InotifyPropertyChanged also for the class. I am not sure how to update second property based on other.
Example:
Properties : ActualValue, ChangedValue, Change
ActualValue is Fixed, and it is possible to update ChangedValue and Change. That means if I update ChangedValue, the Change is calculated like (ActualValue-ChangedValue) and set. And when Change updates, the ChangedValue will be calculated based on ActualValue and Change.
You can put the logic inside the setters of properties that others depend on. Since it’s a circular dependency, just make sure that inside the setters you change the private variable– don’t use the property setter, as that would create an infinite loop. Like this: