What do I need as a developer to be sure my apps support fast task switching?
Ideally, I\'m looking for like a developer check list of dos and don\'ts.
I did sea
If you're upgrading from a normal tombstoning application in Windows Phone 7.0, the only thing you will need to change is the check for e.IsApplicationInstancePreserved in the Application_Activated event - if this property is set to true, it means that you don't have to rehydrate from IsolatedStorage / State. As mentioned in Chris Koenig's excellent answer:
//Windows Phone 7.0
private void Application_Activated(object sender, ActivatedEventArgs e)
{
RestoreStateFromTombstone();
}
//Windows Phone 7.1/7.5/Mango
private void Application_Activated(object sender, ActivatedEventArgs e)
{
if (!e.IsApplicationInstancePreserved)
{
RestoreStateFromTombstone();
}
}
Symptoms for this are your databindings no longer working after you switch apps via multitasking (since you are recreating your object states so the databinding is no longer valid)