Search code examples
.netwpfwinformsicons

Does .NET have icon collections?


Does .NET framework have a collection of icons for use in Windows Forms or WPF application somewhere? How does one use it? For example, how do I use it as an application window icon?

I recall, if you want to display a message box there is a choice to show different icons, I suppose there are more icons in the framework?


Solution

  • If you're using a full edition (not Express) of Visual Studio, an image library is included for you to use freely in your applications (including commercial products!). The primary advantage of using icons from this library is that they are very similar or identical to those that are used in Windows and other Microsoft products, such as Office and Visual Studio, so your users will find them very familiar. This library includes images, icons, and animations and is installed on your computer when you install Visual Studio. For example, if you're using VS 2010, the image library is located here:

    ..\Program Files\Microsoft Visual Studio 10.0\Common7\VS2010ImageLibrary\1033

    To use the files, you first need to extract them from the zip file.

    See this entry on th Visual Studio Team Blog site for more information. As the page explains, the one caveat to using the images is that they must be consistent with their specified usage ("In other words, don't use the 'Cut' image for a 'Copy' command."), but this really just makes sense.


    If you can't find the icons you're looking for included with Visual Studio's image library, there are plenty of free icon packs available on the Internet. Several of the other posts mention their picks, but I'm a huge fan of Fugue Icons. Similar to the Silk icons, they're free for use in your applications as long as you provide attribution. Otherwise, you can purchase a royalty-free license for a very reasonable price.

    If you have money to spend, GlyFX sells high quality icons and graphics, many of which have a similar style as those found in Windows or other Microsoft products.

    And finally, if you're just looking for a particular icon, you can use one of these free icon search engines: