Share via


NavigationService.Navigating Event

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Occurs when a new navigation is requested.

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

Syntax

'Declaration
Public Event Navigating As NavigatingCancelEventHandler
public event NavigatingCancelEventHandler Navigating

Remarks

Typically, you use the OnNavigatingFrom method instead of creating an event handler for the Navigating event. Using the OnNavigatingFrom method is preferable because you do not have to remove the event handler from the NavigationService object to avoid object lifetime issues.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.