I haven't find out how to do that yet.
If I use the window.onbeforeunload event of the "MainWebPage" window, I will at least need to figure out two things: 1) how to decide whether user is closing the window or changing the URL? 2) if the URL is changing, how to stop the unload of the current page in the "MainWebPage" window?
Please let me know if you have any idea.
My development environment:
-- .NET 4
-- IE 7
-- Silverlight 4
-- Windows XP SP3
-- Visual Studio 2010