0
    public event PropertyChangedEventHandler PropertyChanged; 

PropertyChanged

    public void  NotifyPropertyChanged(string a)   
    {
        if(this.PropertyChanged != null)  
        {
            this.PropertyChanged(this,new PropertyChangedEventArgs(a)); 
        }
    } 

i dont quite understand what is going on in this line

this.PropertyChanged(this,new PropertyChangedEventArgs(a));

i did understand all the above but i cant understand how this line work and i ask if i need this for wpf application im using a list of object im following this tutorial

https://wpf-tutorial.com/data-binding/responding-to-changes/

but maybe i can use other way

2
  • See also Data binding overview Commented Jun 30, 2022 at 8:00
  • In order to update the UI when elements are added to or removed from a collection, use ObservableCollection<T> instead of List<T>. Commented Jun 30, 2022 at 8:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.