Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: [WinRT] IDisposable in ViewModel

$
0
0

I was able to use a custom FrameAdapter as shown here: http://caliburnmicro.codeplex.com/workitem/193 to get Deactivate to close when I'm navigating back from a page. Unfortunately, I'm still confused about View and ViewModel lifetimes in WinRT applications. It still appears to me that when I navigate "back" in the page stack, that I'm getting a new instance of my view+viewmodel. I would have expected the view and viewmodel to be persistent.

So, if I navigate from A to B then back to A, B should close, but A (both viewmodel and view) should still be persisted and I should just get back to the existing instance. Is this an incorrect assumption? I'm okay if it is, I just need to adjust my understanding.

Thanks,
Stacy


Viewing all articles
Browse latest Browse all 1760

Trending Articles



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