Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7981651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:26:22+00:00 2026-06-04T10:26:22+00:00

My issue is I have three properties with mutually dependent in my WPF application.

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T10:26:24+00:00Added an answer on June 4, 2026 at 10:26 am

    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:

    private string _change, _changedValue;
    
    public string ChangedValue {
        set { 
            _changedValue = value;
            _change = ActualValue - _changedValue;
            NotifyPropertyChanged("ChangedValue");
            NotifyPropertyChanged("Change");
        }
    }
    
    
    public string Change {
        set { 
            _change = value;
            _changedValue = ActualValue - _change;
            NotifyPropertyChanged("Change");
            NotifyPropertyChanged("ChangedValue");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a class which has three properties as below. public class
I have a class, named DataItem, with three properties: Id, DataValue, and CreatedDateTime. The
I have an issue in entity framework code first, three table in database as
I know there are tons of threads regarding this issue but I have not
I have recently stumbled across an issue where the WPF ListView control seems to
I have a class with lots of string properties that need validated. I'm using
I have a list objects I use to fill using Petapoco. The class properties
Problem Description I have an abstract Paper class that contains common properties of all
You can find the source code demonstrating this issue @ http://code.google.com/p/contactsctp5/ I have three
I have the odd problem that I am not able to open the properties

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.