views:

15

answers:

1

I have silverlight navigation pages (with NavigationCacheMode="Required"). When i normally navigate to these pages (via mouse clicks) the pages get loaded as expected (they are only created once due to the cache attribute).

However, I have a need to update the url in the browser address bar. When I update this via javascript ("window.location.hash=#...") the address and page gets displayed, BUT the page gets re-created - which is causing other issues.

In particular the issue that this is causing is that the page has a Prism.regions defined in the xaml. So it throws an error complaining about a region that has already been registered.

Has anyone tried something similar to this? I dont think there is a way to update the url in the address bar without the browser navigating to it. Note that the url that im trying to update to includes query string paramters, which is not directly "known" by the silverlight navigation framework.

The last resort that i havent tried is to register all the unique Urls with the navigation framework.

A: 

I found an hack. simply cancel the frame_navigating event when ever the url is being updated manually. works great.

AlvinfromDiaspar