Where are my resources hidden?

Viewed 1662

I have a program that contains a number of icons in an "Icons" folder (which are included in the project with Build Action=Resource).

In XAML I can access these icons with code such as <Image Source="../Icons/name.png"/> (".." because the XAML is in a different subfolder); however I want to use the same image in some WinForms code in the same project. Unfortunately,

GetType().Assembly.GetManifestResourceStream("Icons/name.png");

returns null and

GetType().Assembly.GetManifestResourceNames()

only lists a bunch of *.resources files (one for each .resx and one called *.g.resources). So how am I supposed to get the image stream?

2 Answers
Related