Win 7 上的应用程序刷新页面时插件崩溃
我有一个包含 Silverlight 4 oob 应用程序的页面。安装应用程序后,页面上的包应该自动刷新。 我尝试从 InstallStateChanged 上的代码调用脚本或简单的 Document.Submit - 它们在 win XP 上都运行良好(不仅在我的机器上),但在 Win 7 或 Vista 上,页面挂起,甚至 silverlight 插件在安装开始之前崩溃。不过没有刷新功能安装过程就很顺利。 我应该如何对这些系统进行正确的刷新?为什么会发生这种情况的信息也会有帮助。
public App ()
{
this.Startup += this.Application_Startup;
this.Exit += this.Application_Exit;
this.UnhandledException += this.Application_UnhandledException;
InitializeComponent();
App.Current.InstallStateChanged += (s, c) => HtmlPage.Document.Submit(); //used that as the most common used example
}
private void Application_Startup (object sender, StartupEventArgs e)
{
if (Application.Current.IsRunningOutOfBrowser)
{
this.RootVisual = new MainPage();
} else if (Application.Current.InstallState == InstallState.Installed)
{
this.RootVisual = new InstalledPage();
} else
{
this.RootVisual = new InstallPage();
}
}
其中 MainPage 和InstalledPage 是带有文本字段的简单网格。安装页面仅包含带有单击事件的按钮 - 用于安装应用程序。该网页是自动生成的。而已。在 Win 7 和 Vista 上安装时仍然存在相同的问题。
UPD:项目文件
I have a page with Silverlight 4 oob app. After app is installed the bage on the page should automatically refresh.
I tried calling the scripts or simple Document.Submit from code on InstallStateChanged - and they all worked well on win XP (not only on my machine), but on Win 7 or Vista the page hangs or even silverlight plugin crashes before the installation beginning. However without refresh function on the installation process flows smoothly.
How should I do the correct refresh for those systems? The info why this can happen will be helpful too.
public App ()
{
this.Startup += this.Application_Startup;
this.Exit += this.Application_Exit;
this.UnhandledException += this.Application_UnhandledException;
InitializeComponent();
App.Current.InstallStateChanged += (s, c) => HtmlPage.Document.Submit(); //used that as the most common used example
}
private void Application_Startup (object sender, StartupEventArgs e)
{
if (Application.Current.IsRunningOutOfBrowser)
{
this.RootVisual = new MainPage();
} else if (Application.Current.InstallState == InstallState.Installed)
{
this.RootVisual = new InstalledPage();
} else
{
this.RootVisual = new InstallPage();
}
}
Where MainPage and installedPage are simple grids with text field. Install Page contains only button with click event - to install the App. The web page is auto generated one. Nothing more. Still on Win 7 and Vista have the same prob while install as they had.
UPD: project files
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经像这样更改了您的测试用例:
并且它在 Windows 7 上安装后刷新良好。
I have changed your test case like this:
And it refreshes upon install on windows 7 fine.