【发布时间】:2014-10-11 22:07:02
【问题描述】:
我有一个运行异步操作的页面。
当用户按下手机上的 H/W 后退按钮时,我希望应用程序被询问用户他是否“真的”想要退出该页面?如果答案是肯定的,则返回 GoBack,但如果答案是否定的,则留在同一页面上。
我该怎么做?
MessageBoxResult result = MessageBox.Show("Do you really want to leave this page?", "", MessageBoxButton.OKCancel);
if ( result == MessageBoxResult.OK )
{
// .... Go Back
}
else
{
// .... Stay on the same page
}
谢谢!
【问题讨论】:
标签: c# windows-phone-8 navigation windows-phone-7.1 windows-phone-8.1