navigation problem

Apr 28, 2012 at 1:33 PM

hi all,

i am new to silver light and use this menu control but i am unable to navigation on any page my code is .

private void MenuItem_Click(object sender, RoutedEventArgs e)
            string text = (sender as MenuItem).MenuText.ToString();
            MenuItem item = new MenuItem();
            if (text == "Open")
                //this.frame1.Navigate(new Uri("/View/Home.xaml", UriKind.Relative));
                this.NavigationService.Navigate(new Uri("/View/Home.xaml", UriKind.Relative));
               //NavigationService.Navigate(new Uri(""), UriKind.Rel);

            if (text == "Find")
                NavigationService.Navigate(new Uri("/View/About.xaml", UriKind.Relative));


when we click on any menuitem it hit this event but navigatioservice.navigate(new uri("abc"),Urikind.relative) its give me object refernce not set to instance please help me for this.