private void MyFrame_Navigating(object sender, NavigatingCancelEventArgs e) { string uri = e.Uri.ToString(); MessageBox.Show($"Navigating to {uri}"); }
private void MyFrame_Navigated(object sender, NavigationEventArgs e) { string message; if (e.NavigationMode == NavigationMode.New) { message = "Navigated to a new page"; } else { message = "Navigated to a previous page"; } MessageBox.Show(message); }Package library: Windows.UI.Xaml Overall, NavigationEventArgs is a useful class for handling navigation events in a UWP app and is part of the Windows.UI.Xaml namespace.