1
votes

I am using the Tombstone helper from Codeplex and I am a bit confused, I thought that it saves the state of your app's controls i.e Textbox, and I use the code on one page of my app and don't use it on another page, but when I test it it just saves the state of the Textboxes in both pages the same, the Textbox without the Tombstone Helper attached when I test it keeps it's state. The way I am testing is pressing the Windows logo on the emulator opening the browser and then keeping the back button pressed.

this is the code I am using for Tombstoning

protected override void OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs e)
{
    this.SaveState(e); 
}

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
    this.RestoreState();
}

I would appreciate if you could help me

1
Are you sure your testmethod actually causes thombstoning?Henk Holterman
I don't know what other test methods I could do on an emulatorM_K
How long does it take for Tombstone to come into effect?M_K

1 Answers

5
votes

You are not actually tombstoning your app - only deactivating it. To force the app to tombstone (while debugging) do the following:

  1. In Visual Studio, right-click the project in Solution Explorer and select Properties to open the Project Designer.

  2. On the Debug tab, check the Tombstone upon deactivation while debugging check box if you want the application to tombstone when deactivated. Uncheck the check box if you want the application to go into a dormant state when deactivated.

source: http://msdn.microsoft.com/en-us/library/ff402564(v=vs.92).aspx