Software solutions for a mobile world

We were getting reports of this occurring in one of our apps, but it was proving difficult to track down, despite our app emailing a stack trace and other details when we got an error.

Peter did some judicious searching, and found that other people had seen this if the page you were navigating away from was using DispatcherTimer.

This did indeed appear to be the case. To fix this, it was included in tombstoning in the 'OnNavigatedFrom' event. The 'IsEnabled' property of the Timer was saved away.

State[modMain.tombstonetmrRefresh] = tmrRefresh.IsEnabled;
tmrRefresh.Stop();

Then, in the 'OnNavigatedTo' event, check the 'state' of the timer, and re-start it if it was running when we 'tombstoned'.

if (State.ContainsKey(modMain.tombstonetmrRefresh))
   {
       if (Convert.ToBoolean(State[modMain.tombstonetmrRefresh]))
           {
               tmrRefresh.Start();
           }
       State.Remove(modMain.tombstonetmrRefresh);
    }

 This should prevent the 'No Fragment support right now' message from appearing

 

Originally posted 22/Mar/2011

Contact

M: +44 (0)7860 907493
B:  +44 (0)1204 657497

pete@gui-innovations.com

More

Connections

   

Twitter Feed