NavigationService.Navigated イベント

定義

移動するコンテンツが見つかり、 Content プロパティから使用できるが、読み込みが完了していない可能性がある場合に発生します。

public:
 event System::Windows::Navigation::NavigatedEventHandler ^ Navigated;
public event System.Windows.Navigation.NavigatedEventHandler Navigated;
member this.Navigated : System.Windows.Navigation.NavigatedEventHandler 
Public Custom Event Navigated As NavigatedEventHandler 

イベントの種類

次の例は、 Navigatedを処理する方法を示しています。

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

注釈

ダウンロードの開始時にナビゲーション要求に関する関連情報を検出する必要がある場合は、 Navigated を処理します。 この情報は、NavigationEventArgs イベント ハンドラーに渡されるNavigated オブジェクトから取得でき、次のものが含まれます。

  • ソース ページ。 Navigatedが発生すると、ソース ページのユーザー インターフェイス (UI) ツリーの少なくとも一部が解析され、ターゲット コンテンツ コントロールにアタッチされます。

  • 要求された URI。

  • ナビゲーター (NavigationWindowFrame)。

  • NavigateまたはNavigateを呼び出してナビゲーションが開始された場合は、追加のデータ。

  • 応答の詳細 ( WebResponse オブジェクトを使用)。

Navigated は、ソース ページが見つからないか読み込まれていない場合は発生しません。この場合、 NavigationFailed が発生します。

Note

NavigationServiceNavigationFailedを発生させると、Application.NavigationFailed オブジェクトApplicationイベントも発生します。

適用対象

こちらもご覧ください