Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I was wandering how you'd release a shared Viewmodel using the MVVM plugin.
I have a tabcontrol with several tabs sharing the same viewmodel. So, I have:
[PartCreationPolicy(CreationPolicy.Shared)]


When I move across tabs, I don't release the shared Viewmodel but when I close the entire tabcontrol, I want to be able to completely release the Viewmodel.
The following code line no longer releases my viewmodel:
C#
PluginCatalogService.Instance.ReleasePlugin(DataContext);
    DataContext = null;


Does the ReleasePlugin(DataContext) apply to a Shared Viewmodel as well?
I thought I had this working before I upgraded to the released version of Silverlight 5 and Galasoft MVVM SL5

Thanks!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900