views:

79

answers:

1

I tried something like this:

var attrs = typeof(System.Windows.Controls.ComboBox).GetCustomAttributes(typeof(System.Drawing.ToolboxBitmapAttribute), true);

...but attrs is empty collection. I also tried to look up for icons resources in assemblies and nothing found.

A: 

That's because the ComboBox class is the actual run-time class, which has no such attributes. You'll need to find the design-time class. I've briefly looked through some of the WPF assemblies but couldn't find it.

ErikHeemskerk
Hm, are you sure, what this design-time ComboBox class must exists? I tried to find such class among assemblies used by Visual Studio(running with active WPF designer), but nothing found. Also, Windows Forms controls have icons stored as resources in System.Windows.Forms.dll. But I didn't find similar resources in WPF assemblies.
Win4ster