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();
}
}

posted @ 2012-11-09 17:53  藏这儿  阅读(543)  评论(0编辑  收藏  举报