C# と XAML を使用して Windows ストア アプリを開発しています。次のように、XAML で Webview を使用しています。
<Grid x:Name="Output" Grid.Row="1">
<Border BorderBrush="#FF707070" BorderThickness="1">
<Grid>
<WebView x:Name="WebView1" Visibility="Collapsed"/>
<Rectangle x:Name="BlockingRect"/>
<ProgressRing x:Name="ProgressRing1" Height="50" Width="50"/>
<TextBlock x:Name="hello"/>
</Grid>
</Border>
</Grid>
C# の背後にあるコードでは、次のように Webview を呼び出します。
protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
{
try
{
WebView1.Navigate(new Uri("http://www.google.co.in"));
}
catch (Exception e)
{
hello.Text = "Caught Exception!";
}
}
しかし、上記の Webview コードを使用しても、Google またはその他の Web ページは読み込まれません。Webview を適切にロードするために助けが必要です。ありがとう。