【问题标题】:Silverlight MVVM Business Application : Where to place the resource files?Silverlight MVVM 业务应用程序:在哪里放置资源文件?
【发布时间】:2011-03-20 03:07:46
【问题描述】:

默认 Silverlight 业务应用程序 (VS2010) 在 Web 项目中创建一些资源文件(ValidationErrorResources.resx 和 RegistrationDataResources.resx),并在 Silverlight 项目中创建指向这些文件的链接。

但在客户端 Silverlight 项目中也有一些资源文件(ApplicationStrings.resx 和 ErrorResources.resx

我想实现以下设计:

客户

  • Presentation.Silverlight(仅限 xaml)
  • Presentation.ViewModel (ViewModels
  • Presentation.Domain(实体和验证资源文件的链接)

服务器

  • Server.Infra(实体框架)
  • Server.Domain(POCO 实体 + 存储库 + 验证资源文件)
  • Server.Web(Web 应用程序项目)

我的问题:将带有表示层标签翻译的资源文件放在哪里?

这是否定义在:Presentation.SilverlightPresentation.ViewModelPresentation.Domain ???

【问题讨论】:

    标签: silverlight validation mvvm localization resources


    【解决方案1】:

    Itb 非常依赖于标签! 例如,字段的显示名称......需要在整个应用程序中相同,因此,它需要在服务器端定义......即在业务类的数据注释中。

    相反,动作菜单的标题可能属于表示层。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-09
      • 2012-01-25
      相关资源
      最近更新 更多