NavigationService.LoadCompleted 事件

定义

当已加载、分析并开始呈现目标导航内容时发生。

public:
 event System::Windows::Navigation::LoadCompletedEventHandler ^ LoadCompleted;
public event System.Windows.Navigation.LoadCompletedEventHandler LoadCompleted;
member this.LoadCompleted : System.Windows.Navigation.LoadCompletedEventHandler 
Public Custom Event LoadCompleted As LoadCompletedEventHandler 

事件类型

示例

以下示例演示如何处理 LoadCompleted

void NavigationService_LoadCompleted(object sender, NavigationEventArgs e)
{
    string msg = string.Format("{0} loaded.", e.Uri.OriginalString);
    this.progressStatusBarItem.Content = msg;
}
Private Sub NavigationService_LoadCompleted(ByVal sender As Object, ByVal e As NavigationEventArgs)
    Dim msg As String = String.Format("{0} loaded.", e.Uri.OriginalString)
    Me.progressStatusBarItem.Content = msg
End Sub

注解

如果需要在加载完成后发现有关导航请求的相关信息,可以处理 LoadCompleted 。 此信息可从 NavigationEventArgs 传递给事件处理程序的 对象获得 LoadCompleted ,包括:

LoadCompleted 当找不到或加载源页时,不会引发 ,在这种情况下 NavigationFailed ,将引发 。

注意

当引发 LoadCompletedNavigationService,它还在 Application.LoadCompleted 对象上Application引发 事件。

适用于

另请参阅