Silverlight 复合应用程序
我正在尝试找出解决我面临的问题的最佳方案。我有一个 Silverlight 应用程序,它应该由不同的模块组成。我可以使用 Prism,放置区域并加载模块并用加载的模块填充区域,但这在我的情况下还不够。这就是我想要完成的任务:
- 对于从不同 xap 文件加载的大多数视图,我应该在 shell 中的某个位置放置一个元素,这将执行到动态加载视图的导航。
- 该元素(链接到动态加载的视图)应该支持本地化,并且应该具有可动态分配的数据模板,不同的模块链接应该具有不同的内容/数据模板(我正在考虑在服务器上的 xaml 文件中编写数据模板并从 silverlight 读取它们)通过 XamlReader,也许有更好的方法?)。
- Uri 映射和浏览器日志应与导航配合使用。 Silverlight 默认导航机制比 Prism 中的导航机制更适合我的需求。
- 该架构应支持 MVVM。
我想仅此而已。我只是想不出一个好的架构可以满足我所有的需求。任何帮助将不胜感激。
I'm trying to figure out what would be best solution to the problem I'm facing. I have a Silverlight application which should be composed from different modules. I can use Prism, place regions and load modules and fill regions with loaded modules but this is not enough in my situation. Here's what I want to accomplish:
- For most views that gets loaded from different xap files, I should place an element somewhere in the shell, which will perform navigation to the dynamically loaded view.
- That element (which links to dynamically loaded view) should support localization and should have dynamically assignable data templates, different module links should have different content/data template (I'm thinking writing data templates in xaml files on the server and reading them from silverlight via XamlReader, maybe there's a better way?).
- Uri mapping and browser journal should work with navigation. Silverlight default navigation mechanism better suits my needs than the one found in Prism.
- The architecture should support MVVM.
I think thats all. I just couldn't think of a good architecture which will satisfy all my needs. Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道有哪个产品/解决方案可以满足您的所有要求,因此这里对每个产品/解决方案进行一些评论:
我会对提出的其他解决方案感兴趣,因为我们也一直在寻找新的想法。
I do not know of a single product/solution that would cover all your requirements, so here are some comments on each:
I will be interested in what other solutions are proposed as we are always looking for new ideas too.