放置在窗口上的Datasource的UserControls无法找到资源错误 [英] UserControls with Datasource placed on a Window gives Cannot Find Resource Error

查看:69
本文介绍了放置在窗口上的Datasource的UserControls无法找到资源错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个窗口;

创建用户控件
添加项目数据源
拖动 数据源的用户控件创建一个列表框
生成项目
把用户控件&NBSP。
发生错误。

项目运行,但设计师显示无法创建用户控件的实例。我是否遗漏了什么?

解决方案

现在这是Blend的一个已知问题。解决方法是在LocalDocument范围内设置DataSource而不是Project Scope。

您可以阅读以下博客,了解有关项目资源的更多信息。

http://blogs.msdn.com/unnir/archive/2009/03/ 31 /共混物-WPF和 - 资源references.aspx

Create a usercontrol
Add a project DataSource
Drag the datasource to the usercontrol to create a listbox
Build the project
Put the usercontrol on a window.
Error occurs.

Project runs, but designer shows cant create instance of usercontrol.
Am I missing something?

解决方案

This is a know issue with Blend now. The workaround is set the DataSource in LocalDocument scope instead of Project Scope.

You may read the following blog for more infomation regarding the project resource.

http://blogs.msdn.com/unnir/archive/2009/03/31/blend-wpf-and-resource-references.aspx


这篇关于放置在窗口上的Datasource的UserControls无法找到资源错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆