How RequestNavigate works called from external thread

Topics: Prism v4 - WPF 4
Jan 27, 2011 at 4:22 PM


I implemented the prism navigation and the RequestNavigate works well whenever it is called from a button event or something like this. Now I want to implement a demo mode where every view is called from an thread without a user action. But this does'nt work. The RequestNavigate was never called. Got anyone a solution?

Jan 27, 2011 at 5:01 PM


Since navigation is intended to update the UI, the RequestNavigate method should be called from the UI thread. In order to achieve that, you could use a Dispatcher to call that method from the UI thread, or extend the RegionNavigationService (which can be found in the Regions folder of the Prism.Silverlight project of the Prism Library) to internally use a Dispatcher to execute the navigation in the UI thread.

I hope you find this helpful.

Guido Leandro Maliandi

Jan 28, 2011 at 12:38 PM

Thank you, now I used the Dispatcher and it works!