复合 WPF 问题 - View 和 Presenter 构造函数不运行
请考虑以下位置的 VS 2008 .NET 3.5 SP 1 解决方案:
http://www.theese.com /SolutionName.zip
此应用程序使用 Microsoft 的 Composite WPF(又名 Prism)架构。这是一个非常简单的应用程序,演示了我遇到的问题。我有一个模块和一个视图。该视图被映射到唯一的区域。由于某种原因,尽管模块确实加载了,但视图的构造函数没有运行(关联演示者的构造函数也没有运行)。
如果应用程序按预期运行,您将看到一个白色屏幕,中间有一个红色 TextBlock,其中包含文本“ModuleNameView”。相反,仅出现白屏。有人能看到我做错了什么吗?
谢谢, 戴夫
Please consider the VS 2008 .NET 3.5 SP 1 solution at this location:
http://www.theese.com/SolutionName.zip
This application uses Microsoft's Composite WPF (aka Prism) architecture. It is a very simple app that demonstrates a problem I'm having. I have one module with one view. That view gets mapped to the one and only region. For some reason, the view's constructor does not run (nor does the constructor of the associated presenter), though the module does load.
If the application were functioning as intended, you'd see a white screen with a red TextBlock in the middle containing the text "ModuleNameView". Instead, only a white screen appears. Can anybody see what I am doing wrong?
Thanks,
Dave
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的 shell.xaml 中,您有一个错误:
应该是
[注意区域名称开头缺少“{”。这使它对我有用。
In your shell.xaml, you had a bug:
should be
[notice the missing '{' at the beginning of your region name. That made it work for me.