私はSilverlight 4 oob appでページを持っています。アプリがインストールされた後、ページのbageが自動的に更新されます。 InstallStateChangedのコードからスクリプトや簡単なDocument.Submitを呼び出そうとしましたが、それらはすべて自分のマシンだけでなくXPでも勝ちましたが、Windows 7またはVistaではページがハングアップしたり、インストールの前にSilverlightプラグインがクラッシュします。ただし、インストールプロセスのリフレッシュ機能がなくてもスムーズに流れます。 これらのシステムで正しいリフレッシュはどのように行う必要がありますか?これがなぜ起こるのかについての情報も役立ちます。Windows 7のアプリからページを更新する際にプラグインがクラッシュする
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はテキストフィールドを持つ単純なグリッドです。インストールページには、アプリケーションをインストールするためのクリックイベントを含むボタンのみが含まれています。ウェブページは自動生成されたものです。これ以上何もない。 Still On Win 7とVistaには、インストール時に同じ問題があります。
UPD:project files
問題を再現して表示する新しいプロジェクトを作成してください。この方法はあなたを助けるのがはるかに簡単になります... –
@Ai_boy、そのプロジェクトはApp.csファイルのみを含みます:)あなたは何を得ると思いますか? – Eugeny89
App.cs、MainPage.xaml、MainPage.xaml.cs、.csproj、および.slnはすべてzipファイルに含まれています。 –