On Navigated To(NavigationEventArgs) Method
protected: virtual void OnNavigatedTo(NavigationEventArgs ^ e) = OnNavigatedTo;
void OnNavigatedTo(NavigationEventArgs const & e);
protected virtual void OnNavigatedTo(NavigationEventArgs e);
Protected Overridable Sub OnNavigatedTo (e As 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.
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.