Windows Phone开发基础 (4) 退出时提示框

protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
{
MessageBoxResult result = MessageBox.Show("确定要退出吗", "提示", MessageBoxButton.OKCancel);
if (result == MessageBoxResult.Cancel)
{
e.Cancel = true;
}
}

posted @ 2013-03-30 11:03  BellingWP  阅读(155)  评论(0编辑  收藏  举报