Windows Phone 8 - ViewModel recreation

Topics: Questions
Dec 27, 2013 at 5:59 PM
Good time of day,
not so long ago I decided to rewrite my application using MVVM and have chosen Catel as a tool. And now I faced a situation, when the ViewModel needs file to get some of it's data, but when the page is navigated to directly: not from the back button, for example, but when user chooses this page from some other page. The problem is, that every time I use DatePicker, which navigates to its page, and choose some new date or choose nothing, the ViewModel is recreated and initializes again, from scratch, accessing and parsing xml file each time.
So, the question is there any way to preserve the ViewModel and not to recreate it afterwards? Or if not, could you please suggest the best way to resolve this situation.
Thanks in advance!
Dec 27, 2013 at 6:02 PM
We will look into this. Please create a ticket here:
Dec 27, 2013 at 6:20 PM
Edited Dec 27, 2013 at 6:20 PM
Thank you, have created an issue: CTL-285 - ViewModel recreation on DatePicker navigation ( )