Disable navigation when setting the HtmlPage.Window.CurrentBookmark property in Silverlight

I have a scenario where I need to change the HtmlPage.Window.CurrentBookmark property, but I want to do this without restarting the Silverlight application. Right now, I am doing this, but this is causing the application to restart:

public void SetBookmark(string authenticationGroupTag, string ownerUserTag, string roomName)
{
    string bookmark = GetBookmark(authenticationGroupTag, ownerUserTag, roomName);
    HtmlPage.Window.CurrentBookmark = bookmark;
    // HtmlPage.Window.Eval("window.location.hash='" + bookmark + "'");
}

This particular behavior - restarting the application - seems not to be documented anywhere, so I'm wondering if I'm wrong about that. I tried to catch various events related to navigation (either on the .OnNavigatedFrom page, or on the RootFrame.Navigating page), but none of them were actually launched: the application simply unloaded and then rebooted.

So, I think I have two parts to my question: (1) Is this the expected behavior, or am I just doing something wrong? and (2) If this is the expected behavior, has anyone come up with a workaround? Is there a way to update the portion of the url after "#" without restarting the Silverlight application?

0
source share
1 answer

, , , , Internet Explorer , () () window.location.hash. , IE ( ​​ IE9!), Silverlight. Firefox Chrome. (. javascript location.hash, IE Response.Redirect , location.hash .)

0

All Articles