I need to move views from one content control to another, I have no problems with shutdown the views in one control take the view models to the other presentermanager but how can I set the view to be there also? I don't want the views to be created again.
+1
A:
Since the view instance is cached inside the VM, you should automatically get the previous instance hooked when you open the VM in a different PresenterManager. You also have to bind each of the two ContentControl to different PresenterManager.CurrentPresenter:
<ContentControl cal:View.Model="{Binding PresenterManager1.CurrentPresenter}" />
<ContentControl cal:View.Model="{Binding PresenterManager2.CurrentPresenter}" />
(sorry for possible errors in property naming, you are probably using old 1.1 version)
Marco Amendola
2010-10-19 00:20:11
So I only need to move the vm to another manager and he'll do the rest?
Chen Kinnrot
2010-10-19 15:08:56
Yes, if the View part is handled with bindings similar to those I wrote.
Marco Amendola
2010-10-19 19:04:19