Reputation: 301
How can I generate a back key press event through the code in Windows Phone 7 App.
I have an exit button in the app and would like to give it the same functionality as a back button. Basically generating the same event as a back key press would.
Any other ideas on ways to exit and application without actually pressing the back key.
Upvotes: 0
Views: 69
Reputation: 48975
You can use NavigationService
in your page:
if (this.NavigationService.CanGoBack)
{
this.NavigationService.GoBack();
}
Upvotes: 2