Page.OnNavigatedTo method

Applies to Windows and Windows Phone

Invoked when the Page is loaded and becomes the current source of a parent Frame.

Syntax


protected virtual void OnNavigatedTo(
  NavigationEventArgs e
)

Parameters

e

Type: NavigationEventArgs

Event data that can be examined by overriding code. The event data is representative of the pending navigation that will load the current Page. Usually the most relevant property to examine is Parameter.

Remarks

Unlike in prior XAML platforms, the OnNavigated method is called before the visual tree is loaded. This has the following implications:

  • You cannot access a valid Parent property value from an override of OnNavigated. If you need to access the Parent property, do so in a Loaded event handler.
  • You cannot use OnNavigatedTo for element manipulation or state change of controls on the destination page. Instead, attach a Loaded event handler at the root of the newly loaded page's content, and perform any element manipulations, state changes, event wiring and so on in the Loaded event handler.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

Page

 

 

Show:
© 2014 Microsoft. All rights reserved.