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

New Post: How to instantiate a new view/view-model each time it is navigated to?

$
0
0
Hi Federico, thanks for your reply.

As the views/view-models are transient, and instantiated by Castle Windsor, I guess I just have to trust Windsor to release them! I don't know if it's possible to know when a view/VM is released - I tried implementing IDisposable and putting a breakpoint in Dispose(), but I've read somewhere that Castle Windsor doesn't honour IDisposable when releasing.

Regarding the ClearChildViews attribute, I've tried this and it doesn't seem to do anything. Would you expect it to call OnNavigatedFrom() of each child view-model or is it some kind of "internal" cleanup routine?

Viewing all articles
Browse latest Browse all 1878

Trending Articles



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