How to Navigate from One Page to Another in Windows Phone 8 using Hyperlink Button?

Below is a sample code snippet demonstrating how to navigate from a page to another in Windows Phone 8 using Hyperlink Button.

How to Navigate from One Page to Another in Windows Phone 8 using Hyperlink Button?

Assume that the current page in “MainPage.xaml” and the “ACCode.xaml” is the destination page. One can use the code

XAML

<HyperlinkButton Content="GoToAC" NavigateUri="/ACCode.xaml" HorizontalAlignment="Left" Margin="73,292,0,0" VerticalAlignment="Top" Height="57" Width="244" />

C#

HyperLnk.NavigateUri = new Uri("/ACCode.xaml",UriKind.RelativeOrAbsolute);
%d