I'm having difficulty organizing a project solution using the MVVM pattern. I do not use any MVVM framework.
I currently have the following structure:
Solution
|
--- AppView (Projeto principal onde estão as views e que é iniciado pelo App.xaml)
|
--- AppViewModel (Assembly que contém as viewmodels)
|
--- AppModel (Assembly que contém os modelos de dados - Pessoa.cs, Cliente.cs, etc...)
References are:
AppView -> AppViewModel -> AppModel
When you start the application, AppView.MainWindow
is displayed. It has viewmodel
- AppViewModel.MainWindowViewModel
(in separate assembly).
The difficulty arose when I need this viewmodel
to open another Window
, since I can not do this in the AppViewModel
assembly, due to the references.
So I would like to know if anyone has an example of pattern MVVM
with a structure in which the assemblies of view
and viewmodel
are different.