Freigeben über


Page.OnNavigatedFrom Method

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

Called when a page is no longer the active page in a frame.

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

Syntax

'Declaration
Protected Overridable Sub OnNavigatedFrom ( _
    e As NavigationEventArgs _
)
protected virtual void OnNavigatedFrom(
    NavigationEventArgs e
)

Parameters

Remarks

You override the OnNavigatedFrom method to take any final actions on the page when it has become inactive. For example, you can update data related to the page.

Typically, you use the OnNavigatedFrom method instead of creating an event handler for the Navigated event. Using the OnNavigatedFrom 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.