Navigation could be done to class instances derived from “System.Windows.Controls.Page” class. The simplest way to create such a class (and XAML) is by adding to the project new item from “Silverlight Page” type:

In addition to navigation, the Frame provides functionality to navigate Forward/Backward according to own/browsing history. Sample “Next”/“Previous” button handlers:

The history definition for the frame defined by JournalOwnership dependency property:

Automatic [default]

Whether or not this Frame will create and use its own journal depends on its parent

OwnsJournal

The Frame maintains its own journal

UsesParentJournal

The Frame uses the journal of the next available navigation host up the content tree, if available. Otherwise, navigation history is not maintained for the Frame

To raise navigation related events subscribe to themNext:

//This event will be fired when frame is already navigated
this.frame.Navigated += new NavigatedEventHandler(frame_Navigated);
//This event will be fired when frame is navigating
this.frame.Navigating += new NavigatingCancelEventHandler(frame_Navigating);
//This event will be fired when navigation error occurs
this.frame.NavigationFailed += new NavigationFailedEventHandler(frame_NavigationFailed);

By using this Navigation Framework features you could implement deep linking support by URI Routing feature. To use this feature you need to create the UriMapper in application resources. To do so first you need to introduce a namespace in your App.XAML:

In Beta 1 build the Uri Mapper must have “uriMapper” name, otherwise it will not work.

In my case the mapping is very straightforward:

Uri

Target + Description

Home

/Pages/DefaultPage.xaml

Link{number}

/Pages/Page{number}.xaml –-> use {number} as variable received from navigation input

Page/{number}

/Pages/Page{number}.xaml –-> use {number} as variable received from navigation input

Customers/{id}

/Pages/Page1.xaml?action=getCustomer&amp;id={id} –-> use {id} as part of Query String

Products/{id}

/Pages/Page1.xaml?action=getProduct&amp;id={id} –-> use {id} as part of Query String

Stories/{id}&amp;{number}

/Pages/Page1.xaml?action={id}&amp;page={number} –> use {id} and {number} in Query String. You could introduce as many, as you need.

When navigating, the navigating URI becomes something much more readable (and SEO):

The passed query string parameters could be used on specific page from NavigationContext. While creating new “Silverlight Page” visual studio also creates override function “OnNavigatedTo” which being executed right after navigation to the page:

Dear Alex,
I have problem with URI mapping.Please solve this issue.I have Two main pages and one navigating iframes in each main page in my project.On Visit of First main page,I redirect the Iframe source to some page(Normal SL page) on Click of Button X.I have another Button Y which on click Switches to Another main page.the issue is,Before Clicking Button Y,If i have visited any Child page(Using Iframe) in First main page,the same page is being shown in Second page Iframe.What i mean to say is, the Urimapped source(Shown in addressbar) which i visited in First main page is still shown in second main page visit.I don’t want to see URI mapped source in address bar.
Can You help me regarding this.

Can you please give me sample application for my following requirement –
I want a layout with –
1. Header.
2. Left Navigation (Collapsible Menu)
3. Content Page. (It should change as per the click on Collapsible Menu item).
4. Footer (with Current Content Page Name).
5. One Full Screen Button.
Can you please send me the above functionality ASAP. I have an urgent requirement. All should be in Silverlight Application only. Please Please …..

Hi,
Thanks for your reply. I got below problems after creating above mentioned layout –
1. Before and after click on “Full Screen Button” the size of text was changing.
2. For example first my system resolution is in 1024 X 768. If I re-size my silver light IE window I want scrolling. If I change my system resolution grater than above resolution the I don’t want scrolling. at that time also if I re-size my IE window i just want scrolling. (In both cases if I maximize my page the silver light page should view complete).
Finally To implement scroll ability when the window size is altered
3.My applications should support with all resolutions.

after running the sample what i found that url is not mapped..its shows as file:///C:/Project/NavigationDemo_1/NavigationDemo/Bin/Debug/TestPage.html#/Pages/Page1.xaml. Again you have declared the mapping code in app.xmal and when we run the application how navigation frame define in main page gets link with the url mapping defined in app.xmal. Plese guide me

I AM NEW TO SILVER LIGHT,I TOOK ONE PAGE(PAGE1.XAML) AND I TOOK ONE MORE PAGE(PAGE2.XAML), IN PAGE1.XAML I HAD ONE BUTTON WHEN I CLICK I WANT SHOW PAGE2.XAML USING CLICK EVENT.I THINK ITS VERY SILLY QUESTION