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?
March 19th 20 at 08:39
1 answer
March 19th 20 at 08:41
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
This method works, but I think that is a bit of a workaround.
I can create an inherited collection by iterating through all elements of the underlying collection and the creation of each inherited element. Adding tracking changes to the underlying collection and changes in inheritable. But when I do upcast to collection base class, I get like a copy of the collection, and not a reference to the original which was made by the conversion process. - Mallory_Tromp21 commented on March 19th 20 at 08:44

Find more questions by tags WPF