The resource could not be resolved (VS 2010 RC)

岁酱吖の 提交于 2019-11-28 11:28:35

From your note in the comments that "it builds and runs fine," this is almost certainly a problem with Visual Studio. Unfortunately, the VS WPF designer is infamously buggy, and will often fail to resolve or handle perfectly legal XAML. The only true test, therefore, is to compile and run: annoying, but just something one learns to live with.

You may find that the Expression Blend designer handles this situation better. Blend aims more at being a visual designer (graphic designers are the main target users) but Blend 3 has significantly improved support for editing XAML source code. It may be worth giving that a try.

This problem has been "solved" in Expression Blend 4.

Blend 4 automatically gives you the option of locating design time resources if you have a resource that could nor be resolved.

Blend will then make a DesignTimeResourceDictionary from which it will access your resources.

However, this will not help you much if VS2010 is your main editor :(

The solution with Blend 4:

http://adamkinney.wordpress.com/2010/05/04/design-time-resources-in-expression-blend-4-rc/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!