Sep 24, 2011 at 7:45 PM
Edited Sep 25, 2011 at 12:23 PM
I am using your latest 1.2 release of MEFedMVVM.
everything works fine: the service injecting and the viewmodel attaching for the first time I am calling my DialogService where I open the NewSchoolYearWindow and doing ShowDialog on it.
When this window is closed and I call this windows again then the ViewModel is not recreated (via debugger I cant get into the Ctor of the ViewModel) and the former data in the textboxes are still there what
I do not want at all. Somehow the window or the viewmodel seem to be reused. I tried .ViewModel/.NonSharedViewModel/.SharedViewModel they all behave the same?
What do I have to do that the ViewModel is created every time I call the window?
[ExportViewModel("NSVM")] public class NewSchoolYearViewModel : SuperViewModel
private LightCommand _savePathOpenCommand;
private LightCommand _createNewSchoolYearCommand;
private LightCommand _openNewSchoolYearDialogCommand;
private SchoolYear _currentSchoolYear;
private IProjectService _projectService;
private readonly IMediator _mediator;
public NewSchoolYearViewModel(IMediator mediator, IProjectService projectService)
_mediator = mediator;
_projectService = projectService;