Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to override OnNavigatedTo in WPF on a page?

I know it exists on Silverlight but how about WPF?

like image 346
Kingamoon Avatar asked May 28 '12 17:05

Kingamoon


1 Answers

Read this part of the MSDN

Page navigation in WPF is different from Silverlight/Phone because you can opt -in for KeepAlive.

In short: use Loaded and Unloaded. KeepAlive will only influence whether or not a new instance is created.

EDIT

An alternative is to subscribe to the this.NavigationService.Navigated event but that does not get raised just for your page as far as I know.

like image 133
Emond Avatar answered Oct 17 '22 21:10

Emond