How to get (to) a collection that contains "calculated" property in the ViewModel class from the base collection in a Model?
Please help with MVVM, namely the conclusion of the collection which contains "calculated" property in the ViewModel class (inherited from the class of Model) that is not in the Model class. At the entrance is already filled collection. Reviewed more than 50 examples on MVVM, all that is seen is use a class from the model. In this case, it's simple. But in real systems there may be several View, and in each may be similar data but with different calculated properties. Roughly speaking I need Downcasting collection or also called contravariance and need to save a reference so that the data is updated when you change the underlying collection, but it wasn't replaced completely.
For example, in the Model has a Person class with properties Name, Surname, and have a collection ObservableCollection PeopleModel.
In the ViewModel there is a class PersonWithFullName inherit from Person and contains a computed FullName property, and accordingly there is ObservableCollection People. And there is a discrepancy, the original data in this collection must be taken from the collection of ObservableCollection PeopleModel model.
How do such a thing in real systems? Is completely manually perezapustit collection with the basic duty and do it every time data changes in the base? Can anyone have an example or who will prompt in what side to dig?
Perhaps You pass in an ItemsControl a collection of "ObservableCollection PeopleModel", and then in the implementation of the ItemTemplate add Converter that companuy desired properties into a single and display in the form specified by the same ItemTemplate