I have EmployeeList as a observableCollection of Employee Object.
The Employee object has Salary.
I want to display few values like average Salary of the Employees in XAML, and the UI field should be automatically updated when an item is added to the List or When Salary field is changed in any of the items updated.
This can be achieved by creating a property for average and listening to collection Changed and ProperyChanged handlers in the list.
But, I am sure that there should be some other better way to do this. (Like using AttachedProperties or IValueConverter/IMultiValueConverter)
Regarding This, I have following questions.
- Is It possible to use IMultiValueConverter for a List/ObservableCollection of Items? The converter should be called when an Item Added to the list as well as when a particular property changed?