title: Navigation from page1.xaml to page2.xaml in windows phone 8
body: <p>I have two pages: <em>page1.xaml</em> and <em>page2.xaml</em>. I have created one button on page1.xaml; on its click event I navigate to <em>page2.xaml</em>. When I run the application, it fails and the debugger drops me in <em>App.xaml.cs</em>. Below is my code:</p>
  
  
  
  <pre class="lang-cs prettyprint-override"><code>private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)                
  {
      if (Debugger.IsAttached)
      {  
          // A navigation has failed; break into the debugger                      
          Debugger.Break();             
      }         
  }  
  </code></pre>
  
  <p>My page1.xaml.cs code behind is:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public partial class MainPage : PhoneApplicationPage     
  {
      // Constructor
      public MainPage()   
      { 
          InitializeComponent();  
          // Sample code to localize the ApplicationBar                        
          //BuildLocalizedApplicationBar();
      }
  
      private void btnDownloded_Click(object sender, RoutedEventArgs e)         
      {             
          NavigationService.Navigate(new Uri("/DownloadedBooksPortrait.xaml", UriKind.Relative));    
      } 
  }
  </code></pre>