Hello Jeff,
If you just use one RadPage with property for example and want to change this property when selecting new item from the listbox you must use some browser navigation identifier. You have two choices:
Either to use
NavigationService.UseHistoryBookmark = true; (if you prefer to use simple navigation without WebApplication and BrowserHistory)
or
NavigationService.UseBrowserHistory = true;(if you use Webapplication and browser history).
If you do not use different browser identifier for each page instance then the NavigationFramework will navigate for the same page each time because of the same NavigationIdentifier propertys value.(Note: Each RadPage have its own NavigationIdentifier that’s why if you want to navigate to this page multiple 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:
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 custim page instances if you prefer to have this functionality. To do that you have to call 3 eventa 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 thet 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;
}
}
Please find attached sample project. I hope this answers your question.
Sincerely yours,
Boryana
the Telerik team
Check out
Telerik Trainer, the state of the art learning tool for Telerik products.