简体   繁体   中英

In Visual Studio's Designer, why don't any images show up in the Select Resource window?

为什么不显示图像

I got here by clicking on a Button on my Form in the designer, going to the Properties window, finding the Image property, and hitting the ... button that appears to the right of the textbox.

If I open up the Properties\\Resources.resx file in the designer, I see all the images in my project, yet I cannot view them in this list. I suppose I could import the images I want from a directory, but then I would have duplicates.

How can I select from images in the resource file from this dialog? How can I get them to appear? Thanks.

You should probably click the Import button first, and than add the images. This will add them to the resource folder. You should do this from visual studio, not via the explorer

I had the same problem but it was a simple answer. I have multiple projects in my solution, and consolidate my common resources in a separate assembly. The resources must be in the same project (assembly) in order to be accessed by the designer of whatever control you're using that wants to use the image. Otherwise you have to get the images at runtime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM