Recommended WPF Project Structure?

狂风中的少年 提交于 2019-11-30 00:33:34

I agree with alimbada. We have also created different projects for View and View models. It makes things easier to maintain in case of huge projects. Directories we had were -

 - ViewsRoot
    + Base
    + Controls 
    + Documentation 
    + Forms(Windows)
    + Reports
    + Resources 
    + Themes 
    + Utilities 
    App.xaml

 - ViewModelsRoot
    + Collection
    + Commands
    + Converters
    + Resources 
    + TemplateSelectors
    + ViewModels
    + Views (Interfaces for views) 
    Constants.cs 
    Utility.cs

I also believe in planning the structure in advance, this makes easy for all developers to get used to it and follow the same. Doing this later adds confusion and is painful in case you have to create seprate projects. Thats my view and am open to know of other better approches for this.

I tend to have the following directories: Converters, Models, Resources, ViewModels and Views.

I've also seen a solution where the View and ViewModels have been split out into separate projects (see BubbleBurst on CodePlex)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!