Thanks
7 Answers, 1 is accepted
The page information is not cached.
I suggest you do the following:
1.Check that you correctly use
GetPageFromBookmark , GetBookmarkFromUri ,GetUriFromBookmark events (for more information view app.xaml.cs in BooksExample or the online documentation).
2.Make sure that NavigationIdentifier property is set to a different value for all the views.
3.Make sure that you use some identifier (property, variable etc.) that holds different value for all the views.
If this does not help you, could you please provide a sample code so that we can try to reproduce the problem at our side and locate what causes it.
All the best,
Boryana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Here is the code where I set the page to the RadFrame on the MainPage. This event is fired from the PanelBar when a new item is clicked....
private
void PriorReleaseChildBarItem_Selected(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
if (e.OriginalSource != null && e.OriginalSource is RadPanelBarItem)
{
RadPanelBarItem target = e.OriginalSource as RadPanelBarItem;
MenuItem item = (MenuItem)target.Tag;
PriorReleaseCriteria page = new PriorReleaseCriteria();
page.PriorReleaseID = item.Id.ToString();
this.Frame.Navigate(page);
}
}
I'm creating a new instance of the page each time but after the first time the page load does not fire on the Prior Release Criteria page... If I create a new instance of the page shouldn't the page_load fire, it only fires the first time this type of page is loaded into the Frame? The PriorReleaseId tells the calling page how to render it's UI.
thanks
page.NavigationIdentifier =
"priorReleaseCriteria_" + item.Id.ToString();
Not sure why I have to do this since you said your not storing anything internally, but based on having to do this I have to assume you are and the NavigationIdentifier is the key to your internal collection of IFrame pages.
I would assume if new page is passed then the load event of the page would fire.
Thanks Boryana for the help in resolving.
private
void PriorReleaseChildBarItem_Selected(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
if (e.OriginalSource != null && e.OriginalSource is RadPanelBarItem)
{
RadPanelBarItem target = e.OriginalSource as RadPanelBarItem;
MenuItem item = (MenuItem)target.Tag;
PriorReleaseCriteria page = new PriorReleaseCriteria();
page.NavigationIdentifier =
"priorReleaseCriteria_" + item.Id.ToString();
page.PriorReleaseID = item.Id.ToString();
this.Frame.Navigate(page);
}
}
Thanks
In RadNavigation the transition between pages is simply an animated replacement of one page with another.
In the DefaultTransition method there is no parameter. If you use FadeTransition then you can set the duration of the animation. If you want to have some parameter that is specific to a particular page then use the NavigationUri property to customize the Uri that represents the current state of your page navigation.
I hope this answers your question.
Greetings,
Boryana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I beg your pardon, you can give me example code?
Such as Silverlight page page1? Id = 12, navigate to page2, then in page2 page, id = 12 shows a detailed product information. Thank you
You can add a property to RadPage and change this property when selecting a new item from the listbox (see the attached sample project). There are two options:
1) NavigationService.UseHistoryBookmark = true;
(if you prefer to use simple navigation without WebApplication and BrowserHistory)
2) NavigationService.UseBrowserHistory = true;
(if you use Webapplication and browser history).
If you do not want to use a different BrowserIdentifier for each page instance then the NavigationFramework will navigate to the same page each time because of the same NavigationIdentifier property value.(Note: Each RadPage has its own NavigationIdentifier and that’s why if you want to navigate to this page several times with different content you have to change this property!)
So, if you want to use nested page navigation with different instances of one page you have to do the following in the page that you want to navigate to:
public string PageID
{
get
{
return this.pageID;
}
set
{
this.pageID = value;
NavigationIdentifier = "AdminPage" + this.pageID ;
}
}
Note: It is important to set NavigationIdentifier to some custom value in order to have navigation to one page multiple times with different content!
The next step is to enable Back and Forward functionality as well as DeepLinking support for your custom page instances if you prefer to have this functionality. To do that you have to call 3 events in the App.xaml.cs Application_Startup method:
service.GetPageFromBookmark += new EventHandler<FrameInfoEventArgs>(this.Service_GetPageFromBookmark);
service.GetBookmarkFromUri += new EventHandler<UriInfoEventArgs>(this.Service_GetBookmarkFromUri);
service.GetUriFromBookmark += new EventHandler<UriInfoEventArgs>(this.Service_GetUriFromBookmark);
After that add the next methods to App.xaml.cs:
private void Service_GetUriFromBookmark(object sender, UriInfoEventArgs e)
{
string bookmark = e.Bookmark;
}
private void Service_GetBookmarkFromUri(object sender, UriInfoEventArgs e)
{
string uri = e.Uri;
}
private void Service_GetPageFromBookmark(object sender, FrameInfoEventArgs e)
{
if (e.FrameType.Contains("AdminPage"))
{
AdminPage page = new AdminPage();
string frameType = e.FrameType.Substring(0, e.FrameType.Length );
page.PageID = frameType.Substring(frameType.LastIndexOf("_") + 1);
e.Frame = page;
}
}
For more details please refer to the attached sample project.
For more composite scenarios please visit :
http://blogs.telerik.com/boryanamiloshevska/posts/08-12-20/RadNavigation_deep_linking.aspx
(Here you can find full source code of example with custom bookmarks and web application)
I hope this answers your question.
Greetings,
Boryana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.