How to Navigate from One Page to Another in Windows Phone using C# ?

The Navigation to different pages in Windows Phone is handled with the NavigationService Property defined in the PhoneApplicationPage class.

To perform an external Navigation , you should be using the HyperlinkButton or other Launchers that helps you to Navigate to an external URL . You can use the property NavigationService to Navigate to different pages with in your Windows Phone Application.

How to Navigate from One Page to Another in Windows Phone using C# ?

The NavigationService includes a method Navigate which lets you navigate to a specified Windows Phone page.

For example , if you want to navigate to page1.xaml from the MainPage.xaml , you could add the following code in the Mainpage.xaml.

private void button1_Click(object sender, RoutedEventArgs e)
{
     NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
}

You can also use the property NavigationService.Source to specify the URI page to be navigated to .

private void button1_Click(object sender, RoutedEventArgs e)
{
     NavigationService.Source = new Uri("/Page1.xaml", UriKind.Relative);
 //  NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
}
How to Navigate from One Page to Another in Windows Phone using C# ?

How to Navigate from One Page to Another in Windows Phone using C# ?

Leave a Reply