wp 退出应用程序
public static void GoMapNormalPageWithBack(NavigationService NavigationService, string PageUrl)
{
while (NavigationService.CanGoBack)
{
IEnumerator<JournalEntry> list = NavigationService.BackStack.GetEnumerator();
list.MoveNext();
JournalEntry current = list.Current;
string uri = current.Source.ToString();
if (uri == PageUrl)
{
NavigationService.GoBack();
}
else
{
NavigationService.RemoveBackEntry();
}
}
}
}
当前页面按返回键 从任何页面退出程序
public static void GoMapNormalPageWithBack(NavigationService NavigationService)
{
while (NavigationService.CanGoBack)
{
IEnumerator<JournalEntry> list = NavigationService.BackStack.GetEnumerator();
list.MoveNext();
NavigationService.RemoveBackEntry();
}
}