Link: Https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.navigation.navigationeventargs (v= win.10). aspx
NavigationEventArgs class
The data required for navigation events and event handler functions that cannot be canceled. The class inherits directly from the object class.
Public Sealed class
The members of this class are:
the URI of the target content
name |
access type |
category |
description |
extended |
Content |
read-only |
property (properties) |
get the root node of the target page |
|
N Avigationmode |
Read-only |
property (properties) |
move Direction when navigating |
possible values: New, Back, Forward, Refresh. |
navigationtransitioninfo |
read-only |
properties (properties) |
animation type when navigating |
Pre>public class Navigationtransitioninfo:dependencyobject |
Parameter |
read-only |
Property (properties) |
parameters passed by |
|
sourcepagetype |
read-only |
properties (prope rties) |
The data type of the source page |
|
Uri |
read/write |
Properties (properties) |
|
Example:
1 Private voidNavigatebutton_click (Objectsender, RoutedEventArgs e)2 {3Progressring1.isactive =true;4 5 //provide an indication as to where we is trying to navigate to6Rootpage.notifyuser (String.Format ("Navigating to: {0}", Address.text), notifytype.statusmessage);7 8 //Hook The LoadCompleted event for the WebView-know when the URL is fully loaded9webview1.loadcompleted + =NewWindows.UI.Xaml.Navigation.LoadCompletedEventHandler (webview1_loadcompleted);Ten One //attempt to navigate to the specified URL. Notice that a malformed URL would raise a FormatException A //Which we catch and let the user know this URL is bad and to enter a new well-formed one. - Try - { theUri TargetUri =NewUri (address.text); - webview1.navigate (TargetUri); - } - Catch(FormatException mye) + { - //Bad address +Rootpage.notifyuser (String.Format ("Address is invalid, try again. Details---{0}", Mye.message), notifytype.errormessage); A } at } - - voidWebview1_loadcompleted (Objectsender, Windows.UI.Xaml.Navigation.NavigationEventArgs e) - { -Webview1.visibility =Windows.UI.Xaml.Visibility.Visible; -Blockingrect.visibility =Windows.UI.Xaml.Visibility.Collapsed; inProgressring1.isactive =false; - to //Tell the user, the page has loaded +Rootpage.notifyuser ("Page Loaded", notifytype.statusmessage); - } the * voidAddress_keyup (Objectsender, Keyroutedeventargs e) $ {Panax Notoginseng if(E.key = =Windows.System.VirtualKey.Enter) - { theNavigatebutton_click ( This,NewRoutedEventArgs ()); + } A}
Cond
Windows Phone 8.1 EventArgs class Summary (C # description)--navigationeventargs class