0
我正在寫一個Windows Phone 8應用程序。windows phone 8應用程序Application_Activated()從來沒有叫
我剛剛意識到,每當我切換到應用程序(無論是第一次還是在我點擊HOME之後,然後點擊應用程序磁貼回來),Application_Launching()被調用。另一方面,Application_Activated()永遠不會被調用。想知道我是否做錯了什麼。
// Code to execute when the application is launching (eg, from Start)
// This code will not execute when the application is reactivated
private void Application_Launching(object sender, LaunchingEventArgs e)
{
Log.AppLaunch();
}
// Code to execute when the application is activated (brought to foreground)
// This code will not execute when the application is first launched
private void Application_Activated(object sender, ActivatedEventArgs e)
{
Log.AppActive();
}
事實上,按下應用程序圖塊會產生新的開始,同時按下關鍵結果重新激活。非常感謝。 – Roy