I create some folder and organise my files to keep the MVVM Pattern clean. Model Folder, View Folder and ViewModel Folder.
It creates namespace problems, on many levels.
First the InitializeComponent();
- does not exist in the current context
Second the StartupUri=
- Can't find the ressources
I could find some answers but none were complete. From the basic situation:
- I create a new project WPF c# (Lets Name it PROJECT)
- I create 3 new folder.
- I move the MainView to the View folder.
What should be in PROJECT\app.xaml ?
- x:Class=""
- StartupUri=""
What should be in PROJECT\View\MainWindow.xaml ?
- x:Class=""
What should be in PROJECT\View\MainWindow.xaml\MainWindow.cs ?
- namespace
What about the PROJECT\ViewModel\FooViewModel.cs ?
What about the PROJECT\Model\FooModel.cs ?
And why ?
So furthe similar question could be completely anwsered. Thanks a lot