I have a model class Person, which contains string property Name.
I have a repository class Persons which in its constructor creates a few instances of Person class and it has a method which returns all Persons.
I have a viewmodel class PersonsViewModel which is inherited from ViewModelBase that implements INotifyPropertyChanged.
PersonsViewModel have ObservableCollection property AllPersons that contains data from Persons.
In view, I have list of textboxes that are bound to Names.
ItemsControls is bound to Allpersons.
So, if I have two times list of textboxes in my view. They are copies, so they are bound to same properties.
If I edit a textbox in the first list and put the cursor away from the textbox, why does it automatically change the value in the textbox in the second list.
Please, can anybody explain me why does it happen.
I know that I need to use OnPropertyChanged when I edit ViewModels properties after commands, but I didn't use them in this example.
I am new in MVVM and WPF.
Thank you in advance :)