Using Navigation for regions in the Shell when application starts #2586
-
I've been using View injection and it's worked out OK. But after seeing the Langunas pluralsight course, it seems like the way to go is to use Region Navigation. That works fine too and it's especially nice to associate view and viewmodels with I started converting over my application to use Region Navigation, but ran into a problem with my MainWindow View (the "Shell"). What I got is a MainWindow with a few Regions in it (eg header, footer, sidebar...). At the start of the application, I want these to be populated with particular Views. What I did was to inject Found out that I can navigate successfully if do it when the
Applying this to my own application, it still doesn't work-- probably because I missed something because I am in a dumpster fire of refactoring (my problem). But before going further down the rabbit hole, is the above is the "easy path" for making the initial Navigation work for MainWindow regions. Is there a better way? I realize that Prism does not take an opinionated approach, that's great, but it also means that it's easy to put |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Usually, your Views will go in a Module and from within that Module you can then navigate your initial views into the region. You could also just use view discovery instead of navigation for initial views. |
Beta Was this translation helpful? Give feedback.
Usually, your Views will go in a Module and from within that Module you can then navigate your initial views into the region.
You could also just use view discovery instead of navigation for initial views.