I'm using the pattern Tim Heuer outlines here for my Silverlight 4 OOB installation pattern:
http://timheuer.com/blog/archive/2009/08/12/silverlight-out-of-browser-force-install-pattern.aspx
Here is my app's *Application_Startup* method:
private void Application_Startup(object sender, StartupEventArgs e)
{
//string _USERID = e.InitParams["UserAccount"];
if ((App.Current.InstallState == InstallState.Installed) && (!App.Current.IsRunningOutOfBrowser))
{
this.RootVisual = new Installed();
}
else if (!App.Current.IsRunningOutOfBrowser)
{
this.RootVisual = new Installer();
}
else
{
this.RootVisual = new MainPage();
}
ShowBusy(false);
}
The problem is that even when the app is installed and running App.Current.InstallState returns NotInstalled and App.Current.IsRunningOutOfBrowser is false - so my control Installed never shows, it always show the Installer control.
This is the case in both my dev and deployed environments.
I'm stumped on this one, anyone have thoughts?