Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hello,
I started today to make an application for windows store (basic stuff - just learning) and i can't do to work the back button. I started with a blank app called "FirstApp" who generated automatically "MainPage.xaml". After this i add a new page (blank page) called "SecondPage.xaml" where i add an app bar and a back button. The problem is that when i write code on this to come back from second page to main page it doesn't work.
Code for button is:

C#
private void GoBack(object sender, RoutedEventArgs e)
        {
           if (Frame != null && Frame.CanGoBack)
                Frame.Navigate(typeof (MainPage));
        }


The code can be downloaded from the link bellow for who wants to verify in Visual Studio. I used Visual Studio 2012.

download app code

Can anyoane help me to solve this problem please?
Posted

1 solution

 
Share this answer
 
Comments
calincoosmin 28-Aug-13 10:43am    
I looked over those pages but i didn't find anything to help me. Nothing on those pages works for me.
calincoosmin 29-Aug-13 5:27am    
after i take a look again over the first site that you recommended i succeed to make it work. Thanks!
ridoy 29-Aug-13 8:21am    
Glad to 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