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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:37:54+00:00 2026-05-27T05:37:54+00:00

I was answering another question about creating a binding in code-behind, and my original

  • 0

I was answering another question about creating a binding in code-behind, and my original attempt at answering it was to post binding code that didn’t specify a Path. This binding compiles fine, however the value is never updated. If I change the binding to use a Path, it works fine.

Why is this? And what is the correct way to create a binding in code-behind that doesn’t have a Path? For example, how would I recreate Value="{Binding }" in code-behind?

Non-Working code:

Binding b = new Binding();
b.Source = SomeInt;
b.Mode = BindingMode.OneWay;
MyProgressBar.SetBinding(ProgressBar.ValueProperty, b);

SomeInt = 50;

Working code:

Binding b = new Binding();
b.Source = this;
b.Path = new PropertyPath("SomeInt");
MyProgressBar.SetBinding(ProgressBar.ValueProperty, b);

SomeInt = 50;
  • 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-27T05:37:54+00:00Added an answer on May 27, 2026 at 5:37 am

    The binding engine subscribes to INPC and DP-changes on the Source object (and non-leaves on the Path), and checks whether the Path property/properties was/were changed. If there is no Path there are no notifications. A rather unfortunate drawback.

    (I might be oversimplifying the system a bit but the essence is that there are no updates to source-changes, they are not and cannot be monitored)


    {Binding} is equivalent to new Binding() (no additional properties), this binding may update as there are events for DataContext changes.

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

Sidebar

Related Questions

In answering another persons question here on SO, I discovered that there is a
As part of answering another question, I came across a piece of code like
As part of answering another question, I wanted to show that the insane level
As part of answering another question, I wrote the following code whose behaviour seems
When answering another question I started to wonder how I could Add new properties
This came up when answering another user's question (TheSoftwareJedi)... Given the following table: ROW_PRIORITY
Before answering, it is not as easy question as you might have thought about
In answering this code golf question , I ran across a problem in my
After answering a question about how to force-free objects in Java (the guy was
While answering another question, I thought of the following example: void *p; unsigned x

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.