Cannot cancel navigation

Feb 10, 2011 at 10:48 AM

On my entry page, I have 2 tabs "menu" and "options".  When I am on the options tab and click back, I want to go to the menu tab and not close the application.  I have the following code but for some reason the cancellation does not work and the app exits.


void NavigationService_Navigating(object sender, System.Windows.Navigation.NavigatingCancelEventArgs e)
            if (e.NavigationMode == NavigationMode.Back && _currentTab == Tabs.OptionsTab)
                e.Cancel = true;


Any idea what is going on?

Feb 10, 2011 at 1:35 PM

I *think* you will need to hook into the back button event and interpret/cancel it there. Be sure that you check the phone app guidelinese before you do this, lest you find out that it is not allowed.