OnNavigatedTo() Not Being Called

Topics: Prism v4 - WPF 4
Dec 24, 2010 at 11:35 AM

We just started working with the Navigation features in Prism v4, and we haven't been successful in getting the OnNavigatedTo() to be called upon navigation.

Our view implements INavigationAware and the following:

        public bool IsNavigationTarget(NavigationContext navigationContext) { return true; }

        public void OnNavigatedTo(NavigationContext navigationContext) { ... }

        public void OnNavigatedFrom(NavigationContext navigationContext) { ... }            

We're navigating using a simple RequestNavigate statement:

_regionManager.RequestNavigate("Test", new Uri("TestView", UriKind.Relative));

The OnNavigateFrom() fires correctly and consistently, however, OnNavigateTo() doesn't.


Is there something we're missing?

Any assistance is much appreciated.

Dec 26, 2010 at 3:24 AM

Any thoughts as to why this is happening?

Are there are additional steps that we should take to enable OnNavigatedTo()?

Dec 27, 2010 at 6:04 AM

Can you post the complete code of your view? And also from where are you trying to do a RequestNavigate?