推荐的WPF项目结构? [英] Recommended WPF Project Structure?

查看:326
本文介绍了推荐的WPF项目结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是优秀的Visual Studio解决方案和项目结构的坚持者.

I'm a stickler for good Visual Studio Solution and Project structures.

我将开始WPF概念证明工作.

I'm about to start a WPF proof of concept piece of work.

任何人都可以推荐他们使用并发现效果很好的某些WPF项目结构吗?

Can anyone recommend some WPF Project structures they have used and found worked well?

此处 http://drwpf.com/blog/2007/10/01 /58/

他们有一个我喜欢的建议:

They have one recommendation which I like:

    Root
    - Pages
    - Controls
    - Resources
    App.xaml

页面,控件和资源是文件夹.

Where Pages, Controls and Resources are folders.

有人发现某些结构工作良好/工作不正常吗?

Has anyone found certain structures work well / don't work well?

如果你们同意的话,我也不想参加模型视图演示者"的讨论.

Also I'd rather not get into a 'Model View Presenter' discussion if that's ok with you guys.

推荐答案

我同意alimbada.我们还为View和View模型创建了不同的项目.在大型项目的情况下,它使维护变得更容易.我们拥有的目录是-

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.

这篇关于推荐的WPF项目结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆