简体   繁体   中英

How do you add images to a usercontrol?

I created a user control with right click..add..user control..

I want to add images to the resources of the control. Double clicking resx changing the dropdown menu from strings to images, and clicking "add resource".

the message suggests that the control doesn't have its own resources, but I find that strange 'cos if that is the case then why does it have its own resx file?

So, how do I add images to the resources of the user control?

Should I ignore the message?

在此处输入图片说明

You can add ressources directly to the .resx of your user control if you think it belongs there. In this case simply ignore this warning. You just have to keep in mind that this file is automatically generated/populated. So don't change any properties if you don't know their meaning.

Edit: I think the warning has following meaning

  • On the one hand when you change resource properties this can affect the optic and behavoiour of your the control (up to corruption).
  • On the other hand: When changing the control out of the designer, resource properties get set automatically and your previously edits of the resource file can be overwritten.

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