0

I have a folder in my solution named "Resources", it was added after putting images on the Resources.resx file inside Properties. The images on the folder are all set to Build Action => Resource...

How do I put the icon names in a combobox so that the user can just choose from the list.

This is my code but it's not working...

List<object> images = new List<object>();
foreach (var item in Resources)
{
    images.Add(item);
}
comboBox.ItemsSource = strings;

Im new to wpf, so please bear with me :D

EDIT: Sorry it was comboBox.ItemsSource = images; What I wanted to is bind all the images inside the Resources into a comboBox so that it would just list all images...

EDIT: I'm sorry but I really don't know how that is a duplicate of my question, I've read it and it says there that he wanted to change the image dynamically in code behind., What I want is to list all the image in the Resources.resx into a comboBox. So the combobox would have a list of all images inside the Resources.resx...

Cyr
  • 77
  • 6

0 Answers0