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

New Post: ViewModelLocator or what ? Losing Data from another VIew

$
0
0

Hello, I have a very simple problem but I cant find any solution. In first VIew I have ListBox of items and button adding one item. In second View i have only button to go back. Whenever I add data to ListBox with that button everything is correct. But when I navigate to second view and back, I am losing every Data i added because FirstViewModel is created second time. Previously i used MVVM Light and ViewModelLocator to register all ViewModels so that, when i navigated to another VIew, it wasn't created once more. How to do that in Caliburn.Micro WINRT?

Second question: Maybe it is better idea to keep that list which is binded to listbox as global, so it will not be recreated all the time? 


Viewing all articles
Browse latest Browse all 1760

Trending Articles



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