Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

UPDATE: i want to do that in all in code-behind and i know you can do that in feature.xml but i am not sure how exactly.

I am creating a custom web part and i am looking for a way to have my logo (image) when the user add the web part as show in the image.

enter image description here

enter image description here

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You can display an icon next to the web part title as per your first screenshot by setting the "Title Icon Image URL" property under Advanced in the Web Part Toolpane.

share|improve this answer
    
i updated my question.... –  Abu Hamzah Aug 26 '11 at 15:13
    
In that case: msdn.microsoft.com/en-us/library/… –  James Love Aug 26 '11 at 15:16
    
will that work for the second screen shot? –  Abu Hamzah Aug 26 '11 at 15:46
    
Probably not. I had a quick look myself to see how you set that image. I'm not too sure myself as I can't see where it's set. Hopefully someone else will know... –  James Love Aug 26 '11 at 15:59
    
I think the only way to customize the second url is by using WebPartGalleryItemBase.IconUrl when adding a <WebPartAdderExtension>. Read more about those on my blog here sites.wizdim.com/andersrask/sharepoint-2010/… or @Wictor 's blog here –  Anders Rask Aug 26 '11 at 20:54
add comment

just you know guys for the second screen shot you can have the imageurl icon through WebPart.CatalogIconImageUrl Property

below are the two links that helps me.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.webpart.catalogiconimageurl.aspx

http://www.wictorwilen.se/Post/Web-Part-Properties-part-3-the-webpart-file.aspx

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.