HelloWorld.GreetingPage.Page_BackKeyPress C# (CSharp) Method

Page_BackKeyPress() private method

private Page_BackKeyPress ( object sender, CancelEventArgs e ) : void
sender object
e CancelEventArgs
return void
        private void Page_BackKeyPress(object sender, CancelEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show("Press OK to return to the previous page.",
                "WP8 in Action", MessageBoxButton.OKCancel);
            if (result == MessageBoxResult.Cancel)
                e.Cancel = true;
        }