无法找到视图模型的视图?
我正在尝试为一个小型网站制作一个组合用户界面。
我的建筑树如下所示:
- Shell (Conductor.Collection.AllActive)
- 包含多个 iPod(您可以将它们视为小部件)
- 1 个 Pod 是一个 PagePod。
最后一个属于 IPodConductor,因此包含 IPage(如 MainPage、ContactPage ..)的 Screen(pagepod)的组合
我的整个构造可以找到遵循 Caliburns 约定的所有视图模型和视图,但不能找到我的 MainPage。
错误如下: “找不到 Gymsport.Client.Pages.Main.MainPageViewModel 的视图”
我的视图结构如下: Gymsport.Client.Pages.Main.MainPageView
按照惯例,Caliburn 应该能够找到我的视图...但事实并非如此。
任何人都可以提供有关找出或调试此错误的提示的任何提示。
提前致谢。
I'm trying to make a composition UI for a small website.
My building tree looks like this:
- Shell (Conductor.Collection.AllActive)
- Contains multiple IPod's (you can view them as small widgets)
- 1 Pod is a PagePod.
This last one is of sort IPodConductor, so a combination of a Screen ( the pagepod ) containing IPage (like MainPage, ContactPage .. )
My whole construction can find all my viewmodels and views following Caliburns convention, but not my MainPage.
The error is as following:
"Cannot find view for Gymsport.Client.Pages.Main.MainPageViewModel"
My structure to the view is as following:
Gymsport.Client.Pages.Main.MainPageView
Following the convention, caliburn should be able to locate my view... but it doens't.
Anybody any tips on to figure out or pointers for debugging this error.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 CM 中,还有其他逻辑用于查找有关页面等单词的视图(请参阅 此处)。
因此,您可以更改视图以匹配 CM 中的规则,从视图模型中删除“Page”一词,或者您可以使用类似以下内容强制执行自定义简单视图位置:
In C.M, there is additional logic for finding Views concerning words like Page, etc. (see here).
So you can either change your views to match the rules in C.M, remove word Page from your view models, or you can enforce custom simple view location with something like that: