Reputation: 4140
I have an app with a pivot control. The pivot control has two items (pages), both contain a grid
. The grids contain a few buttons and one a map and the other a text block. When the app first runs the pivot works as expected. However, after the app has been running some time, like a day, all the controls on the pivot disappear after pivoting (or swiping). They appear momentarily while swiping, but disappear again once the pivot rests.
Has anyone else experienced this? What could be the cause and solution?
Video: http://www.youtube.com/watch?v=nd7bfTJ53Nk
Code: https://github.com/JamieKitson/TrackLog/
Upvotes: 109
Views: 3026
Reputation: 2745
I am facing the same issue, and its solved weirdly.
If I use Grid inside PivotItem this Issue comes but when I use some other control like StackPanel or something else it works fine.
Upvotes: 0
Reputation: 1250
Quite old question, but still unanswered.
It seems like it's because of Application_Deactivated
event handler, which runs when application is sent to background:
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
diagLog("Deactivated, reason: " + e.Reason);
}
In this event handler you should set RunningInBackground = true
Hope that helps
Upvotes: 1