Поделиться через


NavigationService.NavigationFailed Event

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

Occurs when an error is encountered while navigating to the requested content.

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

Syntax

'Declaration
Public Event NavigationFailed As NavigationFailedEventHandler
public event NavigationFailedEventHandler NavigationFailed

Remarks

You handle the NavigationFailed event when you need to override the default behavior for handling navigation exceptions. You can handle this event to take a corrective action after a navigation exception, such as redirecting to another page or displaying an appropriate error message.

The event handler for the NavigationFailed event is passed an instance of the NavigationFailedEventArgs class, which encapsulates information about the navigation request and the exception. You set the Handled property to true if you do not want the exception to be re-thrown.

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.