Live Chat Icon For mobile
Live Chat Icon

Why does adding images to an ImageList in the designer cause them to lose their alpha channel?

Platform: WinForms| Category: Controls

Looks like the ImageList editor loses the transparency when it does some internal copy/clone of the images. However, it seems that it does work when you add
the images in code to the ImageList.

One workaround (not so tidy) is to add the images to the ImageList in the design time (so that your design-time will be closer to the runtime) and
then clear that ImageList and refill it with the images again, in code.

Take a look at this faq on how to add images to your project and retrieve them programatically during runtime.
Adding image files to a project as an embedded resource and retrieving them programatically.

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.