After a little time, and some help from the STSDev 2008, I finally got a web part that uses my companies logo as its web part catalog icon. Here is how to do it using STSDev 2008.
- Add the IMAGES folder to your RootFiles/TEMPLATE path in your web part project.
- I actually recommend you put a folder inside the images folder to store your image file, but for this example I chose to keep the path short and simple.
- Add the image in the 12/TEMPLATE/IMAGES folder
-
Add the following line to your .webpart file
- <property name="CatalogIconImageUrl" type="string">/_layouts/images/[image file name including extension]</property>
- NOTE the XML here is case sensitive so make sure you have the correct capitalization!
- Perform a BuildDeploy (part of the STSDev 2008 features)
That is all it takes. Now when you look at the webpart catalog you should see the image file for the web part rather than the default window icon.
To do the same action but using a Sharepoint WebPart add the following lines to your .dwp file.
<PartImageSmall>/_layouts/images/[image file name including extension]</PartImageSmall>
-and-
<PartImageLarge>/_layouts/images/[image file name including extension]</PartImageLarge>