Windows 8中的外部页面加载问题应用程序
问题描述:
我直接在Windows 8应用程序中显示一些外部网页,并且此外部页面加载时间过长,有时甚至无法加载全部内容。有人请帮我解决这个问题。我为应用程序使用XAML/C#。Windows 8中的外部页面加载问题应用程序
以下是我加载外部页面的代码,我该如何检查天气页面是否在应用中正确加载?
this.InitializeComponent();
textboxUri.Text = "http://www.google.com/";
WebView1.Navigate(new Uri(textboxUri.Text));
答
web视图类有一个LoadCompleted事件,我想想象你想要这样的东西(伪代码):
{
textboxUri.Text = "http://www.google.com/";
WebView1.Navigate(new Uri(textboxUri.Text));
WebView1.LoadCompleted += LoadCompletedEvent;
}
void LoadCompletedEvent(object sender, eventargs e)
{
//Now the website has loaded, do what you want here
}
答
请给出您的试用代码片段,人们将能够更好地帮助您 – RinoTom 2013-02-25 19:16:14
@RinoTom代码片段添加 – ncw 2013-02-28 15:22:18