qingquan126778 asked the question in the Silverlight forums about how to switch between pages in Silverlight if the pages are in different xap files. First I pointed to Jesse Liberty’s post on multi-page applications (qinqquan wanted different xap files, not just pages) and then Mike Snow’s post on swapping between xap files using the ASP.NET server control (qingquan wanted client side only).
So since neither one was quite right, I coded up an example of my own that is based off Mike’s example but uses client side scripting instead of server side. Basically you grab a reference to the Silverlight plugin control via the onLoad event and then just set the Source property to the new xap.
function App2() { slCtl.Source = "ClientBin/SilverlightApplication2.xap"; }
Download Source Here
BTW – Did you vote on my 10k Content Entry yet? :)