MVVM Light + Blend设计器视图错误:找不到名为“Locator”的资源 [英] MVVM Light + Blend designer view error: Cannot find resource named 'Locator'

查看:773
本文介绍了MVVM Light + Blend设计器视图错误:找不到名为“Locator”的资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用程序运行正常,但在设计器视图中看不到我的设计。

The application runs fine but i could not see my design in the designer view.

它说找不到名为定位器的资源。显然,我没有改变代码中的任何东西,我只是使用数据绑定对话框进行数据绑定...

It says Cannot find resource named 'Locator'. Obviously, i did not change anything in the code, i just did the data binding using the data binding dialog...

任何人面临同样的问题?

anyone facing the same problem?

推荐答案

有两种已知事件可能发生。

There are two known occurrences where this can happen.


  • 如果在构建应用程序之前更改为Blend,那么DLL不可用,可以看到这个错误。构建应用程序可以解决问题。

  • If you change to Blend before you built the application, the DLLs are not available yet and this error can be seen. Building the application solves the issue.

Expression Blend中有一个错误,如果将用户控件放在另一个用户控件(或WPF中的Window) ),内部用户控件使用全局资源,无法找到全局资源。在这种情况下,您也会收到错误。

There is a bug in Expression Blend where, if you are placing a user control in another user control (or Window in WPF), and the inner user control uses a global resource, the global resource cannot be found. In that case you will get the error too.

不幸的是,我没有解决方案的第二点,这是一个混合的bug。我希望我们能尽快看到一个决议,但似乎还在混合4中。

Unfortunately I do not have a workaround for the second point, as it is a Blend bug. I hope we will see a resolution for that soon, but it seems to be still there in Blend 4.

你可以做的是


  • 在外部用户控件工作时,忽略该错误。当您使用内部用户控件时,您应该会看到设计时间数据很好(我不太了解)。

  • Ignore the error when working on the outer user control. When you work on the inner user control, you should see the design time data fine (not very satisfying I know).

使用d:DataContext设置

Use the d:DataContext to set the design time data context in Blend temporarily.

希望这有助于,

Laurent

这篇关于MVVM Light + Blend设计器视图错误:找不到名为“Locator”的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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