如果有人可以告诉我在使用 Windows 8.1 加载网页时需要使用哪个事件处理程序,以及用于使网页进度显示的C#代码,这将非常有用在进度条中。
编辑:如果不清楚,请道歉。这适用于Windows应用商店应用而非Windows窗体。我正在使用C#进行编码,我想知道如何将进度条实现到webbrowser(webview),以便根据加载页面的进度更新它。
感谢。
答案 0 :(得分:1)
请参阅以下答案:
WPF WebBrowser: How I do access progress and new window events
Determine if WPF WebBrowser is loading a page
如果你没有时间,你可以简单地设置一个Indeterminate Progress栏,直到你编写一个改进的Progress代码。
<ProgressBar Name="pb1" IsIndeterminate="True" Visibility="True" />
void theBrowser_Navigated(object sender, NavigationEventArgs e)
{
//Console.WriteLine("Webpage Loaded !!");
pb1.Visibility = Visibility.Collapsed;
}