Click here to Skip to main content
Click here to Skip to main content
Technical Blog

Customizing Visual Studio Extension Icon in Visual Studio 2010

, 25 May 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
How to customize /change the default Visual Studio extension icon and provide your own icon over there.

If you have dealt with Visual Studio Extension (VSIX), you must have seen, after the extension installation, default icons are predefined (as shown in the below image). In this post, I am going to describe how you can customize /change the default Visual Studio extension icon and provide your own icon over there.

image

Before looking into how we can change the icon, first have a quick look at how this command customization works. Once you create a new Extension Project, move to Solution Explorer, open the .VSCT file as highlighted below. This .VSCT file defines the actual layout and type of the commands. It is divided in different sections (e.g. command definition, command placement, …), with each defining a specific set of properties. If you want to customize any of the sections where you want to place your extension, you have to change this file.

image

Open the vsct file and move the Bitmaps section. you will find by default image reference is picking up from Resources\Images_32bit.bmp file.

image

This bitmaps section is used to define the images in command window or others windows. In the below image definition, a list of images has been given as “UsedList”.

image

All the UsedList images must need be specified in a GuidSymbol area:

image

So, you have noticed for each and every image, there is an IDSymbol and Value. Now based on Symbol name (guidImages) and id specified in the command area, images will be picking up from the resource.

image

So, this is how Icons in Visual Studio Extension are displayed. Let’s have a look at how we can customize them. If you want to customize, the first thing that you need is a 16*16 24bit Bitmap Image. So, first create an image as per your extension, place the same inside the Resource folder. This can be a list of images, with 16*16 size of 24bit mode or you can use a single image as well. I have used one single image to make it simple.

image

Now, move to the GuidSymbol area, remove all the previous entries and add your new image name as IDSymbol.

image

Once done, the only remaining task is to provide the same name, in the command Button Icon area.

image

The final change we need to make is to change the mapping in BitMaps area of vsct file.

image

Once done, run your extension, you can view the customized icon in all the applied command areas.

image

Hope this will help you!

Cheers!

AJ


Filed under: .NET 4.0, Visual Studio 2010, VSX

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Abhijit Jana
Technical Lead
India India
.NET Consultant | Former Microsoft MVP - ASP.NET | CodeProject MVP, Mentor, Insiders| Technology Evangelist | Author | Speaker | Geek | Blogger | Husband
 
Blog : http://abhijitjana.net
Web Site : http://dailydotnettips.com
Twitter : @AbhijitJana
My Kinect Book : Kinect for Windows SDK Programming Guide
Follow on   Twitter

Comments and Discussions

 
GeneralMy vote of 5 PinmvpAbhishek Sur25-May-11 23:41 
GeneralNice Pinmemberpranav9525-May-11 22:36 
GeneralMy vote of 4 Pinmemberpranav9525-May-11 22:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.1411023.1 | Last Updated 26 May 2011
Article Copyright 2011 by Abhijit Jana
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid