I have multiple WPF Views and they all use the same .NET type as their ViewModel.
Typically, when I create a new View I get a new instance of ViewModel because creation policy was explicitly specified as not shared.
However, in some cases I want for a new View to reuse ViewModel from another, already existing View.
Say, for example, that existing View is about to be closed and the new View, about to be created, should carry on with the current state of its ViewModel instance.
Sure, if I am doing everything manually I am in complete control so I create what I want when I want.
But for several extensibility-related reasons I have MEF create ViewModel (and Model) parts, so I am looking for suggestions on what would be the way to handle this scenario via MEF?
Currently I am using MeffedMVVM to create ViewModels for each View.