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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:45:16+00:00 2026-05-20T03:45:16+00:00

I used a Multibinding to bind some properties and use the INotifyPropertyChanged interface to

  • 0

I used a Multibinding to bind some properties and use the INotifyPropertyChanged interface to notify these properties’changes.But sadly,it seems that the INotifyPropertyChanged didn’t work. The PropertyChangedEventHandler “PropertyChanged” was null all the time.

Questions:

A. Could you please tell me why the event is null?In my mind,there should be a default method for the event PropertyChangedEventHandler,am I wrong?(Resolved,thanks!)

B. Just like some friends said,I tried again without using the INotifyPropertyChanged.But the target’s property’s value seems to be not changed…


  1. Properties

    public static readonly DependencyProperty LeftOffsetProperty = DependencyProperty.Register("LeftOffset", typeof(double), typeof(NetworkTaskLable), new FrameworkPropertyMetadata(0d, FrameworkPropertyMetadataOptions.AffectsRender));
    public static readonly DependencyProperty TopOffsetProperty = DependencyProperty.Register("TopOffset", typeof(double), typeof(NetworkTaskLable), new FrameworkPropertyMetadata(0d, FrameworkPropertyMetadataOptions.AffectsRender));
    
    public double LeftOffset
    {
        get { return (double)GetValue(LeftOffsetProperty); }
        set { SetValue(LeftOffsetProperty, value); }
    }
    public double TopOffset
    {
        get { return (double)GetValue(TopOffsetProperty); }
        set { SetValue(TopOffsetProperty, value); }
    }
    
  2. Multibinding (It seems work well.By using the converter to calculate a location which is affected by “TopOffset” and “LeftOffset”)

    var multibinding = new MultiBinding() { Converter = new BeginAndStartDateToLeftConverter_NetworkTaskLable(), ConverterParameter = NetworkView };
    multibinding.Bindings.Add(new Binding("Start"));
    multibinding.Bindings.Add(new Binding("StartDate") { Source = NetworkView });
    multibinding.Bindings.Add(new Binding("LeftOffset") { Source = this });
    MainCanvas.SetBinding(LeftProperty, multibinding);
    
  3. INotifyPropertyChanged

    public event PropertyChangedEventHandler PropertyChanged;
    public void CallPropertyChanged(string PropertyName)
    {
        if (PropertyChanged != null)//It seems to be null all the time!!!And the properties'changes were never notified!!!
            PropertyChanged(this, new PropertyChangedEventArgs(PropertyName));
    }
    
  4. Notify the change

    SetValue(LeftOffsetProperty, moveAdorner.LeftOffset);
    CallPropertyChanged("LeftOffset");
    SetValue(TopOffsetProperty, moveAdorner.TopOffset);
    CallPropertyChanged("TopOffset");
    
  • 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-20T03:45:16+00:00Added an answer on May 20, 2026 at 3:45 am

    You don’t need to implement INotifyPropertyChanged for dependency properties. Binding will track changes of these properties automatically.

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

Sidebar

Related Questions

We used to use SourceSafe, and one thing I liked about it was that
Never used a cache like this before. The problem is that I want to
I used to work in a place where a common practice was to use
I have a DataTrigger that I recently refactored. It used to have the DataContext
Used as a scripting language, does Scala have some sort of include directive, or
I used to have a Buy Now button that would go through PayPal, and
i used this method to handle shake event on my app , but i
I notice in several API's, that you may create a struct which is used
Used http://www.ilbcfreeware.org/software.html - I only get static from the files that ilbc_test.exe creates. Does
Used XStream lib, but no children XML was difficult to parse in Java. Wanting

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.