I am trying to use MVVM in my WPF application which displays data from a class in the business logic layer called 'Employee' with a property 'Salary'. I have a simple XAML window with a text box with binding to the Salary property in a ViewModel class 'EmployeeViewModel'. The ViewModel implements INotifyPropertyChanged so that when the Salary property of the EmployeeViewModel changes, the value in the XAML text box also changes. All that works fine.
Now, the Salary property of EmployeeViewModel gets its value from the Salary property of the Employee class. However, if the Salary value of the Employee class is changed by some other procedure going on in the business logic layer, it does not automatically update in the EmployeeViewModel. What is the best way to get it to do this? I was thinking some kind of INotifyPropertyChanged implementation in the Employee class which would let the EmployeeViewModel know to update itself. Or should I use a Dependency Property? Or should I have procedure which 'refreshes' the ViewModel once all of the changes in the business logic layer have been completed. Any help appreciated!