1. Create Silverlight application.
NavigationService.UseBrowserHistory = true; |
NavigationService. UseHistoryBookmark = true; |
For more information visit the help section.
In both cases you must set these properties to true before writing any other code in App.xaml.cs:
private void Application_Startup(object sender, StartupEventArgs e) |
{ |
NavigationService.UseBrowserHistory = true; |
// NavigationService.UseHistoryBookmark= true; |
…. |
} |
2. The next step is to add some RadPage classes in your application.
3. After you have
added all the pages and navigation structure between them then you are ready to
use DeelLinking just go again in App.xaml.ca and add the following:
private void Application_Startup(object sender, StartupEventArgs e) |
{ |
….. |
if (!NavigationService.LoadDeepLink()) |
{ |
//Navigate to some page |
} |
} |
private void Application_Startup(object sender, StartupEventArgs e) |
{ |
NavigationService.UseBrowserHistory = true; |
this.RootVisual = new RadFrameContainer(); |
NavigationService service = NavigationService.GetNavigationService(); |
if (!NavigationService.LoadDeepLink()) |
{ |
service.Navigate(new Page1()); |
} |
} |
RadNavigation framework uses the NavigationIdentifier property of RadPage in order to change borwser bookmarks while navigating between pages. By default its value is set to the full name of the RadPage class. But if you prefer to use can custom navigation identifiers or custom browser bookmarks. You can also navigate to the same page but with different content and different browser identifier.
The Silverlight application below shows how you can use all these features of the RadNavigation framework(The full source code you can find attached at the end of the blog post):