Almost all real applications do not have only one XAML page, so page navigation is particularly important. Page navigation involves not only page jumps, but also data transmission between pages and heavy loading of Back buttons. This section only provides simple page navigation, data transmission, and Back buttons for further writing.
1. Use XAML for page navigation
In fact, it is to use the navigateuri attribute of the hyperlinkbutton control to navigate. For example, A URI is similar to a generic Resource Identifier (Uniform Resource Identifier) of a URL. It can be used to navigate within an application or even connect to content on the web.
2. Use C # code navigation;This is essentially the same as the previous method. It only writes the jump in an event of a control, usually in the click Time. For example, navigationservice. navigate (New uri ("/views/music. XAML", urikind. Relative ));
3. Address alias
(1) first in the app. add the namespace: xmlns: nav = "CLR-namespace: system. windows. navigation; Assembly = Microsoft. phone "; (2) In app. <application. resources>, such
<nav:UriMapper x:Key="UriMapper">
<nav:UriMapping Uri="Music" MappedUri="/View/Music.xaml"></nav:UriMapping>
</nav:UriMapper>
(3) The urimapper object used in the application also needs to set the object in the resource dictionary in the rootframe of the application. Add the following to the app. XAML. CS constructor:
this.RootFrame.UriMapper = Resources["UriMapper"] as UriMapper;
(4) You can use the XAML or background code to implement navigation, for example:
<HyperlinkButton NavigateUri="Music"/>
NavigationService.Navigate(new Uri("Music", UriKind.Relative));
The following is a reference article: http://www.cnblogs.com/konck/archive/2012/01/10/2318232.html