Pivot 上的控件消失

我有一个应用程序,有一个枢轴控制。Pivot 控件有两个项(页) ,都包含 grid。网格包含几个按钮,一个是地图,另一个是文本块。当应用程序第一次运行时,枢轴工作正常。然而,当应用程序运行一段时间(比如一天)后,枢轴上的所有控件在枢轴(或滑动)之后都会消失。它们在滑动时会暂时出现,但是一旦支点停止,它们就会再次消失。

有其他人经历过这种情况吗? 原因和解决办法是什么?

视频: http://www.youtube.com/watch?v=nd7bfTJ53Nk

密码: https://github.com/JamieKitson/TrackLog/

3000 次浏览

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

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.