我的类未显示在 xaml 中,因此可以将其添加为 SilverLight 中的资源
我创建了一个类,以便可以将其绑定到组合框。我有一个解决方案,其中有两个项目 test 和 test.web。在 test.web 中,我添加了一个新类,以便我可以将其绑定到组合框。在同一个 test.web 中,我在 ADO.net 实体对象生成器的帮助下创建了一些实体,当我尝试将我的类作为资源添加到网格时,可以看到这些类。为什么不是我的班级?
当我将类添加为资源时,出现错误,未找到类型“..”。验证您没有缺少程序集参考......
I have created a class so that I can bind it to a combo box. I have a solution where there are two projects test and test.web. In the test.web I have added a new class so that I can bind it to a combobox. In the same test.web I have created few entities with help of ADO.net Entity Object Generator and those classes can be seen when I am trying to add my class as resource to a grid. Why not my class?
When I add my class as resource I get error the type '..' was not found. Verify that you are not missing assembly reference....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后我找到了答案。我对SilverLight的理解是错误的,因为我还在学习它。我发现我无法在客户端直接访问模型中的所有类。它们都应该使用 DomainService 公开,并且 DomainService 是您可以在客户端访问的东西,如果您必须通过 DomainService 访问您的类公开它。
Finally I found the answer. My understanding of SilverLight was wrong as I am still learning it. I found out that I cannot directly access all the class in the model on the client side directly. They all should be exposed using DomainService and DomainService is the thing which you can access on the client side, if you have to access your class expose that through DomainService.