canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rationality behind the Pages folder

ShuhuaGao opened this issue · comments

In a typical MVVM project, we set up three folders: Models, ViewModels, and Views. However, the Stylet template generates a project with a "Pages" folder, which contains both the ShellView.xaml and the ShellViewModel.cs. Is there any special purpose for this structure?

In my opinion, the template is supposed to set up two folders in consistency with other codes: ViewModels containing the ShellViewModel.cs, and Views for the ShellView.xaml.

You can do whatever you want: Stylet supports have views and viewmodels in separate folders.

The samples and tutorial use a Pages folder, because that is my personal preference and I wrote them. The template follows suit for consistency. You're free to change anything in a project generated from a template.