RequestNavigate and Singleton objects

If you are using PRISM to navigate to your views, be careful when you register objects with Unity as singleton. Singleton object is only created once and only once in its lifetime. So if you are  using RequestNavigate and implementing INavigationAware, it will ignore your return flag from IsNavigationTarget if you have registered the View or ViewModel as singleton with Unity.

This will mean that it will always reuse the same view irrespective of your flag from IsNavigationTarget.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s