NavigatingCancelEventArgs Class

July 28, 2014

Provides data for the OnNavigatingFrom method and the Navigating event.

System.Object
  System.EventArgs
    System.ComponentModel.CancelEventArgs
      System.Windows.Navigation.NavigatingCancelEventArgs

Namespace:  System.Windows.Navigation
Assembly:  System.Windows (in System.Windows.dll)

public sealed class NavigatingCancelEventArgs : CancelEventArgs

The NavigatingCancelEventArgs type exposes the following members.

  NameDescription
Public methodNavigatingCancelEventArgs(Uri, NavigationMode)Initializes a new instance of the NavigatingCancelEventArgs class, based on URI and mode.
Public methodNavigatingCancelEventArgs(Uri, NavigationMode, Boolean, Boolean)Initializes a new instance of the NavigatingCancelEventArgs class, setting all initial property values.
Top

  NameDescription
Public propertyCancelGets or sets a value that indicates whether the operation should be canceled. (Inherited from CancelEventArgs.)
Public propertyIsCancelableGets a value that indicates whether you can cancel the navigation.
Public propertyIsNavigationInitiatorGets a value that indicates whether the current application is the origin and destination of the navigation.
Public propertyNavigationModeGets a value that indicates the type of navigation that is occurring.
Public propertyUriGets the uniform resource identifier (URI) for the content that is being navigated to.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The NavigatingCancelEventArgs object provides event arguments for the OnNavigatingFrom method on a Page or the Navigating event. The Navigating event is raised or the OnNavigatingFrom method is called just before navigating from a page.

You can prevent a navigation request by setting the Cancel property to true. To evaluate a navigation request, you can examine the values of the NavigationMode and Uri properties.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2014 Microsoft