Hi my name is Boryana Miloshevska and I’m a member of Telerik`s Silverlight team.
This is my first blog post and it is about the new RadPageNavigation framework that we just released for Silverlight 2 RC0.
RadPageNavigation is a framework that allows you to easily add navigation service to your application.
To do that you can use the provided RadPage, RadFrame, RadFrameContainer and NavigationService classes, or you can use your own classes to implement the IFrame and ITransition interfaces. The framework is 100% compatible with the WPF navigation service. Navigation between pages is supported. You can also use frames inside each page and to navigate in the frame (very similar to the HTML iframe). Full history journal for backward/forward is available as well as Deep Linking support (which means that now you can provide a link directly to every Page from your application). In my next blog post I will blog in details about RadPageNavigation deep linking.
NavigationService is the most important class in this framework. In order to perform page navigation you can use one of the following methods:
In order to implement Deep Linking you can use:
HtmlPage.Window.CurrentBookmark = SelectedPage.GetType().Name or you can use NavigateToUri(RadFrame frame, Panel pageContent, RadPage currentPage) method.
NavigationService also has Navigating event that is raised when Navigate, GoBack or GoForward is called.
If you prefer not to use NavigationService you may call RadFrame`s Navigate method or SetSource property and implement the same functionality.
Another important part from the framework is RadFrameContainer. If you want to use RaFrames or any animation Transition you must place each RadFrame or RadPage in RadframeContainer.
This tutorial demonstrates how to create a PageNavigation example using nothing more than few RadPages and RadFrameContainers. Here is the final result:
To start off, create a new Silverlight project and call it CvExample. Once you have the project created go ahead and add a reference to the Telerik.Windows.Controls.dll. At the top of your main UserControl, add a namespace in order to use the dll. Next thing you need to do is changing the UserControl with RadPage:
In exactly the same way add another six RadPages for our CvExampl and name it in that way:
MainPage, AboutPage, WorkExperiencePage, EducationPage, QualificationPage and SkilsPage.
In order to perform navigation between pages you need an instance of NavigationService class. Open App.xaml.cs , set RadFrameContainer as application RootVisual and call NavigationService`s Navigate method:
If you want just a simple navigation without any animation transitions between pages just call for example
The other choice is to use RadPageNavigation FadeTransition or SlideTransition.
Download the source of the project:
CVExample.zip(Change the extention to .zip and unzip it, once you save it locally)
Subscribe to be the first to get our expert-written articles and tutorials for developers!