如何在awesomium浏览器结束呈现页面时完全检测到?我尝试使用此代码,但它不正确检测它。在SO我找不到答案。
bool LoadingFinished;
Wb.LoadingFrameComplete += WbLoadingFrameCompleted;
...
void WbLoadingFrameCompleted(object sender, FrameEventArgs e)
{
if (!e.IsMainFrame)
return;
LoadingFinished = true;
}
void LoadUrl(string url)
{
LoadingFinished = false;
Wb.Source = new Uri(url);
while (!LoadingFinished)
{
Thread.Sleep(100);
WebCore.Update();
}
}
答案 0 :(得分:0)
更改网址后尝试此代码:
Window
答案 1 :(得分:0)