title: how to navigate to a panorama page in windows phone?
body: <p>In my main page i try to navigate to another page(which is a panorama page) ,My c# code for mainpage is,</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Net;
  using System.Windows;
  using System.Windows.Controls;
  using System.Windows.Documents;
  using System.Windows.Input;
  using System.Windows.Media;
  using System.Windows.Media.Animation;
  using System.Windows.Shapes;
  using Microsoft.Phone.Controls;
  
  namespace Panoramatry
  {
    public partial class MainPage : PhoneApplicationPage
    {
      // Constructor
      public MainPage()
      {
          InitializeComponent();
          displsy();
      }
      public void display()
      {
          NavigationService.Navigate(new Uri("/GettingStarted.xaml",UriKind.Relative));
      }
    }
  }
  </code></pre>
  
  <p>And my <strong>GettingStarted.xaml</strong> page has the following code,</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Net;
  using System.Windows;
  using System.Windows.Controls;
  using System.Windows.Documents;
  using System.Windows.Input;
  using System.Windows.Media;
  using System.Windows.Media.Animation;
  using System.Windows.Shapes;
  using Microsoft.Phone.Controls;
  
  namespace Panoramatry
  {
    public partial class GettingStarted : PhoneApplicationPage
    {
      public GettingStarted()
      {
          InitializeComponent();
          display();
      }
      protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
      {
          base.OnNavigatedTo(e);
          display();
      }
      public void display()
      {
          MessageBox.Show("Navigation Success");
      }
    }
  }
  </code></pre>
  
  <p>But while executing the navigation code in the mainpage i get the following error,</p>
  
  <pre><code> An exception of type 'System.NullReferenceException' occurred in Panoramatry.DLL but was not handled in user code
  </code></pre>
  
  <p>But when i use a button on main page, and add this navigation to its click event, then it works perfectly fine!
  What could be the problem?
  Thanks in advance!</p>