WPF Prism中一个区域内的子模块

时间:2016-11-08 11:21:04

标签: wpf mvvm module navigation prism

我的WPF应用程序中有3个模块(模块A,B和C)。然而,模块C具有子模块(C1,C2,...,C5)。事实上,模块C它只是一个容器"对于它的子模块,所以我不确定模块C是否实际上是一个模块。我想知道Prism方法之后的最佳设计是什么。目前这是我的解决方案架构:

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

我的Shell有两个区域:MainContentRegion和MainNavigationRegion: enter image description here

每个模块都有2个视图(XNavigationItemView和XView),一个用于MainNavigationRegion,另一个用于MainContentRegion

模块C(我告诉你它是子模块C1,C2,... C5的容器)在MainContentRegion中有一个区域,用于子模块C1,C2之间的子导航,...... C5:

enter image description here

那么,这个解决方案的最佳方法是什么?有什么想法吗?

0 个答案:

没有答案