0
我正在使用C#和XAML开发Windows应用商店应用程序。我在XAML中使用Webview,如下所示。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#代码我称之为网页视图如下。
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!";
}
}
但是Google或任何其他网页并未使用上述Webview代码加载。我需要帮助正确加载Webview。谢谢。