I'm using Prism for navigation in my Wpf application. I have a few modules, and each of them is registering themselves in a main menu through common commands sent using the IoC container in the bootstrapper. The menu entries are bound to common commands for navigation - which will open the correct view in some Region. All is based on recommendations I've found through the Prism site.
My problem now is that I have a module where there is a condition stating if i want to open ViewA or ViewB in the main region. Example: Let's say I have a customer module - and then a "Customer" menu item which will open the customer module in the main view. And there is a condition: If I have an active customer I want to open the CustomerDetailsView when clicking the menu item, else I want to open the CustomersAdminView.
What is the recommended approach to solving this? I see a few options, but I think all of them sound a bit hacky. Now I'm working on creating what would be a MasterCustomerView in the example above. This view will then check the condition and open the UserControl giving either Details of Admin inside. I'm not all satisfied with this solution though - Would it be a legitim approach? Any better?