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

  • SEARCH
  • Home
  • 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 692477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:39:18+00:00 2026-05-14T02:39:18+00:00

In WPF, I’ve three objects exposing the same DependencyProperty (let’s say it’s an integer).

  • 0

In WPF, I’ve three objects exposing the same DependencyProperty (let’s say it’s an integer). I want all three property values to remain synchronized, i.e. that whenever the int value changes in an object, this value is propagated to the two other objects. I think of multibinding to do the job, but I don’t know how to detect which object changed, thus which value should be used and propagated to the other objects.

Edited: here is my tentative code for multibinding, with the false hope that it would work without additional code:

// create the multibinding
MultiBinding mb = new MultiBinding() {
    Mode = BindingMode.TwoWay,
    UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged
};

// create individual bindings to associate object_2 and object_3 to object_1
Binding b2 = new Binding() {
    Source = object_2,
    Path = new PropertyPath("X")
};
Binding b3 = new Binding() {
    Source = object_3,
    Path = new PropertyPath("X")
};

// add individual bindings to multibinding
mb.Bindings.Add(b2);
mb.Bindings.Add(b3);

// bind object_2 and _3 to object_1
BindingOperations.SetBinding(object_1, TypeObject_1.XProperty, mb);

But actually, there is a runtime error, saying the binding set by the last instruction is lacking a converter. But again I don’t know how to write this converter (there is nothing to convert (as this is the case in the related MS sample of code linking 3 rgb properties to a color property), only to forward the value of the property changed to the two other properties).

I understand I could solve the problem by creating an X_Changed event in the 3 types and then have each object registering to the two other objects event. I don’t like this “manual” way and would prefer to bind the 3 properties together.

  • 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-14T02:39:19+00:00Added an answer on May 14, 2026 at 2:39 am

    Actually nobody was able to find the solution within 2 weeks, so I believe there is none. Sometime it’s like this…

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

Sidebar

Related Questions

Using WPF, and VB.net, I want to update a textbox in a textblock with
Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A
WPF allows to specify linear affine transform on graphical objects. With this you can
WPF has the Typography.Variants attached property that lets you do superscript and subscript. However,
Why WPF DataGrid control doesn't shows defined DisplayNameAttribute values for grid columns? However this
WPF validation system performs intial validatation of an object (I mean - all fields
WPF - I'm using BackgroundWorker to create a Model3D object, but when I want
WPF, C#, I have a datagrid with several columns, many rows. I want each
WPF's ItemsControl will display a focus rectangle when it thinks it has focus and
WPF Toolkit, How to apply date format in C# for datepicker control?

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.