Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Cannot access a disposed Object in Prism Mef

$
0
0
HI DCherubini,

Actually we are using the tab based application and passing the main container of the application to the tab viewmodel and set as parentcontainer of the tab viewmodel, so once the particular tab was closed, it is disposing the particular tab viewmodel container, since it is referring the same object of main container so it is also gets disposed and then when we try to load a view with content control in another tab. It is throwing the exception mentioned above and it reproducible all the times(10/10) when it is trying to access the regionmanager.regionname in the content control of the view.

Note:

In main container we are loading the common dlls of the application, whereas in the tabviewmodel we are loading the tab based dlls, so we are passing the main container and assign the same container as parent container to the tabviewmodel and creating a child contrainer from it using CreateChildContainer() in unity container, now we have changed to mef and in that CreateChildContainer() is not available, prob that may be the reason.

kindly suggest me the possible solution to handle this situation.

Thanks.

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>