I'm very new to modules in Prism and am struggling to understand how to use them properly. I want to have a navigation panel like in the image below, which I stole from Google.
Let's say that I have 3 modules for 3 separate concerns: NavigationModule
, HelpModule
, and FeedbackModule
. If I want to show "Help" when the app first loads, my understanding is that I would do something like the following:
- Define Regions for navigation and content in my Shell (main WPF project)
- Upon execution, load the navigation view into the navigation Region
- Upon initialization of the
NavigationModule
, load a view fromHelpModule
into the main content Region
This leaves me with a few questions about what modules should know about each other:
- Should the Shell's project have a reference to the
NavigationModule
in order to load its view? - Should the
NavigationModule
have a reference to theHelpModule
in order to load its view? And a reference toFeedbackModule
in order to load its views on demand?
If the answer to these questions is "no," then what's the best way for modules to be aware of each other's views? I could create a shared class library with constants for view names, but it seems a bit troublesome to maintain a bunch of strings that way whereas with references I could use nameof()
. I would appreciate any direction. Thanks.