This is literally the last thing I need to get working on my WP7 app before it's finished, so naturally it's giving me trouble...
I was able to implement the [SurviveTombstone] attribute on one of my viewmodels, and it's working perfectly. A second viewmodel, however, appears to be completely ignoring the attributes. I have included the [SurviveTombstone] attribute on both the class
and the properties that I want to save. The properties themselves are simple--a bool, an int, and a long. They have public getters and setters. The values are set properly before the app tombstones. In one case, there's nothing else that could overwrite the
property--I made it just for the purpose of tombstoning a piece of data.
I even tried persisting a test string property that I set with a hardcoded value in the constructor, and it comes up null when the app resumes.
The only difference I can find between the two classes is that I am calling the method that is trying to use the properties from the viewmodel's constructor. Are tombstoned properties restored after the constructor completes?
Is there anything else I need to set that is easy to overlook?