C# Windows应用程序进度条

C# Windows应用程序进度条,c#,windows,xaml,windows-applications,C#,Windows,Xaml,Windows Applications,我使用Windows应用程序模板创建网络视图,并在该网络视图中加载我的响应网站。我尝试使用ProgressRing向用户显示应用程序正在加载,直到页面完全加载。progressing即将到来,但不会消失。下面是我的应用程序的实际代码 如能迅速提供帮助,将不胜感激。谢谢 MainPage.xaml: x:Class=“Zify.MainPage” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x=”h

我使用Windows应用程序模板创建网络视图,并在该网络视图中加载我的响应网站。我尝试使用
ProgressRing
向用户显示应用程序正在加载,直到页面完全加载。
progressing
即将到来,但不会消失。下面是我的应用程序的实际代码

如能迅速提供帮助,将不胜感激。谢谢

MainPage.xaml:
x:Class=“Zify.MainPage”
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local=“使用:Zify”
xmlns:d=”http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable=“d”
后台=“{ThemeResource应用程序页面背景Themebrush}”>

将Grid.Row=“1”添加到ProgressRing

尝试添加此行以将控件转移到事件,该事件确定
Webview
控件是否已完全加载网页

WebView1.LoadCompleted += new Windows.UI.Xaml.Navigation.LoadCompletedEventHandler(WebView1_LoadCompleted);
然后在进度条完全加载后停止它

void WebView1_LoadCompleted(object sender, Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
 //code for hiding progress bar/ring
 ProgressRing1.IsActive = false; //for progress ring
 ProgressBar1.IsIndeterminate = false; //for progress bar
}
资料来源:

WebView1.LoadCompleted += new Windows.UI.Xaml.Navigation.LoadCompletedEventHandler(WebView1_LoadCompleted);
void WebView1_LoadCompleted(object sender, Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
 //code for hiding progress bar/ring
 ProgressRing1.IsActive = false; //for progress ring
 ProgressBar1.IsIndeterminate = false; //for progress bar
}