Reputation: 2072
Usually the icons files (ico/bmp/png)for Controls in Visual Studio Toolbox are embedded into the assembly as resource files. The System.Windows.Forms.dll seems to have the icon files that are colored and they are for VS2010 and lower. Where does the VS2012 loads the black-n-white icons for toolbox controls from?
Also, is there a guideline on how to create these set of icons for VS2012, Since the icons should look good in both light and dark theme of VS2012.
Thanks!
-Datte
Upvotes: 4
Views: 3120
Reputation: 17281
In my quest to un-metro Visual Studio I've found that the basic toolbox icons for HTML (MVC & Web Forms) and Win Forms are stored as bitmap resources in a number of unmanaged DLLs. WPF and others are stored mostly as PNG and ICO files in the newer managed DLLs. The managed resources are a combo of directly embedded files as well as serialized Bitmaps, PNGs, Icons, Image List Streams, and binary Streams.
Take a look in these files for most of the toolbox images
\Microsoft Visual Studio 11.0\Common7\IDE\1033\Microsoft.VisualStudio.Windows.FormsUI.dll \Microsoft Visual Studio 11.0\Common7\Packages\htmled.dll
As for how the color is modified, it looks like Visual Studio replaces white with black, along with changing shades of white/grey to their darker counterpart while leaving the rest of the color alone. In years past they've included a style guidline document along with the SDK. I haven't found one yet for 2012 and their MSDN link still points to the 2010 document.
Upvotes: 1
Reputation: 12546
It's not quite so simple as creating some icons for each color theme. The icons are actually built from glyphs and color adjusted at runtime based on the theme. Have a look at the Visual Studio Dark Theme blog post where the team talks about themed icons to get an understanding of the approach they've taken.
To quote the important detail:
All of our Visual Studio 11 icons are maintained in an icon repository as vector graphic files
To answer the follow up question you may have, I'm not sure where the vector graphics are stored.
Upvotes: 3