IViewModelManager.CancelAndCloseViewModels

Oct 10, 2013 at 9:22 AM
Edited Oct 10, 2013 at 9:22 AM
Hello.

Now, that I solved my problem with the SerializationException I can test the functionality: CloseView Models, which I have requested.

That's my code
var manager = ServiceLocator.ResolveType<IViewModelManager>();
            manager.CancelAndCloseViewModels((viewModel) => viewModel != null && (viewModel is StationViewModel || viewModel is PlaceViewModel));
In PlaceviewModel I have added an Destructor with trace message. But the destructor is not called.

Either not if I add "GC.Collect"
Coordinator
Oct 10, 2013 at 9:06 PM
Check if the Close method on the VM is called. Destructor can be called much later. Also make sure that you are using the latest nightly build.