Click here to Skip to main content
16,015,444 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi every body
I'm building an windows phone8 app which have several pages.I use Navigation code for back button in each page.
C#
private void Back_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {

            NavigationService.Navigate(new Uri("/Menu.xaml", UriKind.Relative));
        }


if I open 2 pages and back to main menu by back button, when I want to go to new page it has error "unhandeled exception":
in App.xaml.cs page:
C#
// Code to execute on Unhandled Exceptions
        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            if (Debugger.IsAttached)
            {
                // An unhandled exception has occurred; break into the debugger
                Debugger.Break(); // it is where my app stop from debugging
            }
        }


but if I open each page one by one and exit app and again go to second page and exite an again do it for other pages,every thing works correctly.
I think it's because of stack that became full and it happend so I try to find a way that on back_Tap code, after navigating I delete stack but I couldn't find out.
it's just a guess...
now , Is there anyone who knows what is my problem and how can I solve it?
thank you for spending time on my article...
Posted
Comments
Vincent Beek 6-Nov-14 0:57am    
Can you navigate like this?

((Frame)Window.Current.Content).Navigate(typeof(yournamespace.Menu));

Not sure if this will help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900