Sub-modules within a Region in WPF Prism

2019-09-05 17:32发布

问题:

I have 3 modules within my WPF application (Module A, B and C). However module C has sub-modules (C1, C2, ..., C5). In fact, module C it's only a "container" for its sub-modules, so I am not sure if module C it is actually a module. I am wondering what is the best design following the Prism approach. At the moment this is my solution schema:

PrismModularApp

- App.config
- App.xaml
- Bootstrapper.cs
- Shell.xaml

PrismModularApp.Controls

PrismModularApp.Infrastructure

- RegionNames.cs

PrismModularApp.Modules.A

- AViewModel.cs
- ANavigationItemView.xaml
- AView.xaml
- AModule.cs

PrismModularApp.Modules.B

- BViewModel.cs
- BNavigationItemView.xaml
- BView.xaml
- BModule.cs

PrismModularApp.Modules.C

- CViewModel.cs
- CNavigationItemView.xaml
- CView.xaml
- CModule.cs

My Shell has two regions: MainContentRegion and MainNavigationRegion:

Every module has 2 views (XNavigationItemView and XView) one for the MainNavigationRegion and the other one for the MainContentRegion

The module C (the one I told you it is a container for sub-modules C1, C2, ... C5) has an area in the MainContentRegion for sub-navigation between sub-modules C1, C2, ... C5:

So, what's the best approach for this solution? Any ideas?