I am starting developing in silverlight for windows phones. As i understood, the xaml views in silverlight are stateless.
How can i preserve a view with a listbox so that after returning to it, i don’t have to reload the data in that view?
Here is an example:
let’s say i have some list items that have some photos,text etc. from the internet.
When clicking on a listbox item i go into a detailed view for the respective item. When i go back,reloading the listbox isn’t efficient (from the perspective of time, processing, bandwich etc.). How can i save that view so that i don’t have to reload it? Can it be done?
UPDATE: i just started a timer in a view and navigated to another and when i went back, the timer was still running ( it was a Threading.Timer), so does this mean that the views are not stateless and they are not destroyed when navigating to other views?
Try using Mat laceys Tombstone helper, it makes saving the state of all Silverlight pages very easy to do, in fact in most cases it is just two lines of code per page to do.
WP7 Tombstone helper