How to disable back button of windows phone after one click
I have a problem in my app is that when the user hit back button multiple times the app become crashed.Is there any way to handle this problem ?Is any way to disable back button after the first click from a page.so further click can be开发者_如何学JAVA avoided.The exception i am getting while hitting back button multiple time is 0x8000ffff.Is there any solution for this in windows phone 7.1?
You should fix the issue which is causing your app to crash. If you disable the back button behaviour you risk failing marketplace certification due to requirement 5.2.4[.1] http://msdn.microsoft.com/en-us/library/hh184840(v=VS.92).aspx
You can control that, here is a sample code:
private void YourPage_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)
{
//App.NaviService.BackKeyPress(sender, e);
if (NavigationService.CanGoBack)
{
NavigationService.GoBack();
}
}
精彩评论