Prolog:私はc#/xamlプロジェクトを持っています。このプロジェクトでは、MainPageにMainWebViewを含む2つのページ(MainPage.xamlとSecondExamplePage)があります。mainPage.xaml.csに、簡単なコードがあります。
protected override void OnNavigatedTo(NavigationEventArgs e)
{
MainWebView.Source = new Uri("ms-appx-web:///assets/physics/index.html");
}
ユーザーがアプリを起動すると、たとえば1つの画像でhtmlページ(index.html)が表示され、それがすべてです(私は今、それは間違った方法ですが、顧客はこれを望んでいます)。
必要な作業:ユーザーが(index.htmlページの)画像をクリックすると、SecondExamplePage.xamlに移動する必要があります。どうすればよいですか?WebView.ScriptNotifyとWebView.InvokeScriptについてリードしましたが、このメソッドがどのように機能するのかわかりません。