hi i am a new guy to windows phone7 and SO too. Here i have pivot control as root and i am trying to navigate to another page using the service uri.
Following is the piece of code which i am using to navigate from pivot to another view
And then i created the another page called page1.xaml
In the mainpage.cs i write the code like:
PivotItem p = new PivotItem();
p.Header = "Home";
p.Content = new page1();
main.Items.Add(p);
so here the pivot application has its content as page1
my problem is: if create the button in page1 for navigate to another page called page2.
NavigationService.Navigate(new Uri("/Page2.xaml",UriKind.Relative));
But when i try to navigate the app get crashed and i got the error log as follows (this error from listbox seleciton changed)
System.NullReferenceException at activity name(Object Sender, SelectionChangedEventArgs e) at
System.Windows.Controls.Prmitive.Selector/OnSelctionChanged