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 843315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:06:23+00:00 2026-05-15T06:06:23+00:00

I have a complex value object class that has 1) a number or read-only

  • 0

I have a complex value object class that has 1) a number or read-only properties; 2) a private constructor; and 3) a number of static singleton instance properties [so the properties of a ComplexValueObject never change and an individual value is instantiated once in the application’s lifecycle].

public class ComplexValueClass
{
    /* A number of read only properties */
    private readonly string _propertyOne;
    public string PropertyOne
    {
        get
        {
            return _propertyOne;
        }
    }

    private readonly string _propertyTwo;
    public string PropertyTwo
    {
        get
        {
            return _propertyTwo;
        }
    }

    /* a private constructor */
    private ComplexValueClass(string propertyOne, string propertyTwo)
    {
        _propertyOne = propertyOne;
        _propertyTwo = PropertyTwo;
    }

    /* a number of singleton instances */
    private static ComplexValueClass _complexValueObjectOne;
    public static ComplexValueClass ComplexValueObjectOne
    {
        get
        {
            if (_complexValueObjectOne == null)
            {
                _complexValueObjectOne = new ComplexValueClass("string one", "string two");
            }
            return _complexValueObjectOne;
        }
    }

    private static ComplexValueClass _complexValueObjectTwo;
    public static ComplexValueClass ComplexValueObjectTwo
    {
        get
        {
            if (_complexValueObjectTwo == null)
            {
                _complexValueObjectTwo = new ComplexValueClass("string three", "string four");
            }
            return _complexValueObjectTwo;
        }
    }
}

I have a data context class that looks something like this:

public class DataContextClass : INotifyPropertyChanged
{


    private ComplexValueClass _complexValueClass;
    public ComplexValueClass ComplexValueObject
    {
        get
        {
            return _complexValueClass;
        }
        set
        {
            _complexValueClass = value;
            PropertyChanged(this, new PropertyChangedEventArgs("ComplexValueObject"));
        } 
    }
}  

I would like to write a XAML binding statement to a property on my complex value object that updates the UI whenever the entire complex value object changes. What is the best and/or most concise way of doing this? I have something like:

<Object Value="{Binding ComplexValueObject.PropertyOne}" />

but the UI does not update when ComplexValueObject as a whole changes.

  • 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-05-15T06:06:24+00:00Added an answer on May 15, 2026 at 6:06 am

    Your original scenario should work just fine because in most cases Bindings recognize change notifications on any part of their property path. I in fact tried out the code you posted to confirm and it does work just fine.

    Are there other complexities you may not be expressing in your stripped down sample? The primary one I can think of would be collections->ItemsSource Bindings but there could be something related to the property you’re assigning the bound value to (since it’s obviously not an Object) or something else entirely.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 422k
  • Answers 422k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'm not sure exactly what you are asking for, but… May 15, 2026 at 11:26 am
  • Editorial Team
    Editorial Team added an answer In Tools->Options->Environment->General, you can disable Animate environment tools. This should… May 15, 2026 at 11:26 am
  • Editorial Team
    Editorial Team added an answer If you need to access multiple transactional resources within the… May 15, 2026 at 11:26 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.