I'm developing an out-of-browser (OOB) app using Silverlight 4. For installation, I present a webpage with an install button to install the app OOB. When the user clicks the button, Application.Current.Install is executed, installing the app asynchronously.
Problem is, after the install process is complete, the InstallStateChanged event should fire, where I have code which copies data from my XAP file to the Isolated Storage. But the InstallStateChanged never fires, even though the main page displays properly upon installation.
I've tried this in Elevated Trust setting as well, no luck.
Any thoughts on this?
I finally figured out what I was doing wrong. I blame the lack of VB examples on the web for this :-)
In the Install_click event (executed by a user click event on the install button), I was failing to wire up the InstallStateChanged event, like so:
I failed to realize this step was needed and assumed the event fired on its own. Now I could proceed to put my post-install action code in the *App_InstallStateChanged* event routine: