Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top