A new feature of Silverlight 3 is page Jump by providing a navigation framework in its APIs.
This method is provided in APP. XAML to use its URI ing mechanism.
1: <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3: x:Class="NavigationSample.App"
4: xmlns:navcore="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation" >
5: <Application.Resources>
6: <navcore:UriMapper x:Key="uriMapper">
7: <navcore:UriMapping Uri="About-Us" MappedUri="/Views/AboutPage.xaml" />
8: </navcore:UriMapper>
9: </Application.Resources>
10: </Application>
If you are not sure about the absolute path of the page, you can also use wildcards to enable dynamic URI injection.
1: <navcore:UriMapper x:Key="uriMapper">
2: <navcore:UriMapping Uri="{}{page}" MappedUri="/Views/{page}.xaml" />
3: </navcore:UriMapper>
This is very friendly. It can help you achieve absolute page Jump dynamically.
You can also follow naming rules. For example, if you are sure you only need to restrict routing on the page or other pages, you can name your view page "xx Page. then you can write a route as follows:
1: <navcore:UriMapper x:Key="uriMapper">
2: <navcore:UriMapping Uri="{}{page}" MappedUri="/Views/{page}Page.xaml" />
3: </navcore:UriMapper>
These navigation routes are read from top to bottom, so by default, you can still have clear (or Scalable) routes at the same time. The following code is provided:
1: <navcore:UriMapper x:Key="uriMapper">
2: <navcore:UriMapping Uri="About-Us" MappedUri="/Views/AboutPage.xaml" />
3: <navcore:UriMapping Uri="History" MappedUri="/Views/AboutPage.xaml" />
4: <navcore:UriMapping Uri="{}{page}" MappedUri="/Views/{page}.xaml" />
5: </navcore:UriMapper>
When an access request about-US, history, or about page is sent, it is directed to/views/aboutpage. XAML. This provides you with certain scalability and granularity, as well as additional search engine optimization scores for your page content.