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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:01:43+00:00 2026-06-05T09:01:43+00:00

When i first assign the bidning to the Label in its constructor, the Label

  • 0

When i first assign the bidning to the Label in its constructor, the Label binds correctly and displays correct information based on current ComponentData value of CurrentMarket class. However when ComponentData changes, OnPropertyChanged event fires ok, but the ProperyChanged handler is always NULL. Can someone kindly suggest what am i doing wrong?

I have a label and i set the binding like this:

    public StyledLabel(string Property, int i)
    {
        Binding BindingText = new System.Windows.Data.Binding(Property);
        BindingText.Source = Statics.CurrentMarket.ComponentData;
        BindingText.Converter = new TextConverter();
        this.SetBinding(Label.ContentProperty, BindingText);

     }

Current market class looks like this:

public class CurrentMarket : INotifyPropertyChanged
{
    string sMarket = "";
    ComponentData cComponentData;

    public string Market
    {
        set
        {
            sMarket = value;
            OnPropertyChanged("Market");
            ComponentData = SharedBoxAdmin.Components[sMarket];
        }
        get
        {
            return sMarket;
        }
    }

    public ComponentData ComponentData
    {
        get { return cComponentData; }
        set
        {
            cComponentData = value;
            OnPropertyChanged("ComponentData");
        }
    }

    public CurrentMarket()
    {
    }

    public event PropertyChangedEventHandler PropertyChanged;

    private void OnPropertyChanged(string info)
    {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (handler != null)
        {
            handler(this, new PropertyChangedEventArgs(info));
        }
    }

 }

Thanks!

  • 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-05T09:01:45+00:00Added an answer on June 5, 2026 at 9:01 am

    Try specifying the property name that you want to bind to as the Path of the Binding (rather than as part of the Source):

    Binding BindingText = new System.Windows.Data.Binding(Property);
    BindingText.Source = Statics.CurrentMarket;
    BindingText.Path = new PropertyPath("ComponentData");
    BindingText.Converter = new TextConverter();
    this.SetBinding(Label.ContentProperty, BindingText);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use a for line in data: loop to assign the first
First off I have an app that provides the user information about the amount
Here's my code: First I assign some htm code where there's a table in
The problem seems simple at first: just assign an id and represent that in
So I'm trying to assign a variable @time to be the first day of
I have a 3 dimensional array. I want to assign only the first two
How do I assign a style to every first cell of every row in
I have a byte array I want to assign as follows: First byte specifies
Can we you get our JavaScript to run in the first place to assign
My batch file terminates prematurely after I assign the first environmental variable (script output

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.