Expression Blend 4 - 如何编辑/设置构建操作/属性? [英] Expression Blend 4 - How do I edit/set Build Action/properties?

查看:79
本文介绍了Expression Blend 4 - 如何编辑/设置构建操作/属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是Blend 3的一个问题,并且"出现"了。不要用Blend 4修复。(请不要告诉我,我需要Visual Studio 2010,我买不起!)

This was a problem with Blend 3, and "appears" to NOT be fixed with Blend 4. (Please don't tell me I need Visual Studio 2010, I can't afford it!)

在我的.cs代码隐藏中我需要加载图像文件,我通过"添加新项目"添加到项目中

In my .cs code-behind I need to load an image file, which I added to the project via "Add New Item"

当我运行项目时,我得到一个"的NullReferenceException"当Silverlight试图找到该文件时。

When I run the project I get a "NullReferenceException" when Silverlight tries to find the file.

我看的每个地方,我问的每个人,都给了我以下响应类型:


  • 在运行时加载资源文件,它必须有它的"BuildAction"。属性设置为"内容"。您可以通过在将解决方案资源管理器树中的文件添加到项目后选择该文件,然后从"属性"泊坞窗设置其"构建操作"来完成此操作。
    另外,在加载它时,如果它在某个目录中,则应该在文件路径中包含该目录。

我如何做到这一点!!!!!!

HOW DO I DO THIS IN BLEND!!!!!!

我的图像文件显示在项目文件列表,但右键单击不提供访问其属性的选项。我查看了菜单,似乎无法找到设置"BuildAction"的方法。对于我的形象。

My image file shows up in the project file listing, however right-click does not provide an option to access it's properties. I've looked through the menus and can't seem to find a way to set the "BuildAction" for my image.

关键是我能够在后面的代码中加载图像并让它在运行时工作。

It's critical that I am able to load an image in the code behind and have it work at runtime.

我确定我只是没有看到它,但它并不是我所期望的显而易见的地方。

I'm sure I'm just not seeing it, but it's not in the obvious places I would expect it.

 

推荐答案

我是抱歉,您无法在Blend中设置此项。您需要使用VS 2010.幸运的是,您可以使用免费快递版。

I'm sorry, but you can't set this in Blend. You need to use VS 2010. Fortunately you can use the free express edition.

 

http://www.silverlight.net/ getstarted /

http://www.silverlight.net/getstarted/

http://www.microsoft.com/web/gallery/install.aspx?appid=silverlight4tools;silverlight4toolkit;riaservicestoolkit

http://www.microsoft.com/web/gallery/install.aspx?appid=silverlight4tools;silverlight4toolkit;riaservicestoolkit


这篇关于Expression Blend 4 - 如何编辑/设置构建操作/属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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