开发者

Silverlight Application.InstallState - Incorrect

开发者 https://www.devze.com 2023-03-10 09:58 出处:网络
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

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开发者_Python百科 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?


I have seen problems with this when the browser is in private browsing mode.


UPDATE: Red Herring - refer comments

Have the same problem.

I've heard that this only works proper when the application has been code-signed. Don't know if this is true as I cannot test to verify.

This might relate: http://msdn.microsoft.com/en-us/library/dd550721(v=vs.95).aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消