1

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

2 Answers 2

2

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.

5
  • i updated my question....
    – Nick Kahn
    Commented Aug 26, 2011 at 15:13
  • In that case: msdn.microsoft.com/en-us/library/…
    – James Love
    Commented Aug 26, 2011 at 15:16
  • will that work for the second screen shot?
    – Nick Kahn
    Commented Aug 26, 2011 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
    Commented Aug 26, 2011 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 Commented Aug 26, 2011 at 20:54
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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