Customizing Visual Studio 2010

Customizing Visual Studio 2010

  • Comments 31

Don’t like where a button is by default?  Go ahead and move it.  To speed up your workflow, add handy commands to a context menu.  To reduce clutter, remove commands that you never use.  Yes, customizing the UI can take a little while to get it just right, but doing so will provide you with a workspace that can boost your productivity.

I recorded a video (split in two parts) to demonstrate some of the different UI customizations that can be done in Visual Studio 2010. In Part 1, I demonstrate creating a new toolbar, adding/removing commands to/from a toolbar, changing toolbar dock locations. In Part 2, I show how to add a command to the Editor’s context menu.

Part 1: http://ecn.channel9.msdn.com/o9/ch9/0/6/4/2/1/5/contextmenucustomization_ch9.wmv 

Part 2: http://ecn.channel9.msdn.com/o9/ch9/8/8/0/2/1/5/commandbarcustomization1_ch9.wmv

When we switched over to the WPF shell, we had to re-implement much of the customization UI.  Our priority was to include a customization experience that was accessible to all users (e.g. those who rely on screen readers). Unfortunately, the drag and drop interaction for customization that we has in previous versions of Visual Studio was expensive to re-write, and we weren’t able to include it.  I’ve received a number of comments on this via bug reports through Microsoft Connect, and I want to reassure people that we will be exploring improvements in future releases.

suzanne_thumb

Suzanne Hansen – Program Manager, Visual Studio Shell Team
Short Bio: Suzanne started at Microsoft in 2006 as a member of the Popfly team.  She joined the Visual Studio Shell team in 2009, and is responsible for features that include the command bar and customization. 

Leave a Comment
  • Please add 2 and 4 and type the answer here:
  • Post
  • Good stuff! It looks like the Add Command dialog would really benefit from some substring search or filtering instead of just type-ahead-find.

  • Hi Michael - thanks for the feedback!  I agree that a search feature would improve the experience of adding commands.  It's not always clear what category a command is in, and there are so many commands available.

  • These are all good changes, especially the context menus are a lot.. less impossible to edit than they were (though the amount of them does make it rather cumbersome)

    Another area that, at least for me, is used a lot more frequently and is rather awful to manage is the Keyboard page in the Options dialog.. There are just tons of unsorted items (the search there helps a lot), and only 4 per page.

    If nothing else, making the Options dialog larger would have been really nice.

    Still, good changes.. and merry christmas!

  • Thank you Daniel - Merry Christmas to you too!  I'm glad to hear that the changes have made editing context menus simpler.  (I agree that there are a lot of menu and commands to sort through as you try to locate a particular item.  We need to look into improvements to that experience in the next release.)

    As for your comments on the Options dialog, we have receieved several customer requests to make that dialog resizable.  While we're not able to make this change for Visual Studio 2010 (it actually involves coordination between many teams) it's something that we will consider for the next release of Visual Studio.

  • The secornd vedio is really useful and saves time.

    Small things but developers must know these things.

    Really useful stuff based on usage

  • Hello, thanks for great videos.

    Have some question.

    I add macros to my toolbar. I cannot select an icon to represent the macro, can only rename the macro. How can i set an icon?

    This functionality seems present in some form. If i load my VS2008 settings, the icon is there until i save as 2010 settings and load back again.

  • @Valamas: Unfortunately assigning or editing icons to commands through Customize dialog is not possible in VS2010. It is one of the features got cut for lack of time. This is however something we'll consider adding back in next version.

    Until then, you can still set icons on your commands by using an add-in, then accessing the command through DTE.

    You can set CommandBarButton.Style to msoButtonIcon then set CommandBarButton.Picture with a stdole.IPicture. You can create IPicture objects using a helper class deriving from AxHost, e.g.

       public class ImageHelper : System.Windows.Forms.AxHost

       {

           // private constructor, needed for extending AxHost

           private ImageHelper (): base (null)

           {

           }

           /// <summary>

           /// Get an IPicture object from an Image.

           /// </summary>

           public static object GetIPictureFromImage (Image image)

           {

               return GetIPictureFromPicture(image);

           }

       };

    (a similar sample code in VB is given here http://support.microsoft.com/kb/555417)

  • @Valamas

    What version of the product are you trying this on?  Beta2?  RC?  What do you mean 'save as 2010 settings' exactly?  Shut down VS after import?  Make further customizations to the same menu/toolbar and then shut down VS?  Export Settings?

    Ryan

  • @visualstudioblog: thanks for the response. It is not a tragedy; im using a single word as the command.

  • @Ryan : Im using RC1 and I have macros to save and load my settings (like Export Settings in options). That way, I can save my "template perspective" of the editor and the editor in attach mode... and be able to close and modify my layout as i need for more space etc, then at the click of the command, i load my template layout again.

    I found that importing my current vs2008 settings and then saving and loading as vs2010 settings caused the file to grow massive, 40Megs massive. So i reset the to default vs2010 settings and started again. Now my file size is back under 300k and load and saves in normal time, unlike some 10 minutes at one stage.

    Cheers, Valamas

  • Is there a way to modify an icon for a command?

    Lots of commands do not have icons in 2010, even they had in 2008.

  • @Andy: Unfortunately, not for RTM.  We are, however, working on an extension that should enable some of these customization scenarios.  We'll blog about it here when the extension is ready for release.  

    Weston Hutchins

    Program Manager - VS Platform

  • Wow! Capability to create and modify icons was available in VS 2008, 2005, and if I remember also in 6.0 all the way to 2.0.

    What is worse than the inability to create icons in 2010, is that many of the pre-existing ones are gone and only some long texts are the defaults.

    I do not know about others, but for me it is v. unhandy to see my long-used favorite custom toolbars imported from prior versions are rather practically useless.

    "Visual" is everything these days. :)

  • I completely agree with Andy Hoffman. Having no way to display icons for many toolbar items makes them often useless. The texts in the toolbars take up much too much space.

  • I have been using the "C" IDEs since Visual C/C++ 1.0. I like the setup that I use. I have been refining it since since Visual C/C++ 6.

    The very first thing I do when I load a new compiler is setup all of the toolbars the way I like them. This includes adding all of the compile/run/debug commands so they are always visible, on the same toolbar, and make sure that that toolbar is always in the same place. Why because I like it that way.

    In Visual Studio 2008 it takes about 10 minutes to get things setup the way I like. In Visual Studio it will take 3-4 hours.

    Something that would speed things up a lot that could be done easily is when you are adding a command to remember where you are. So when you add the next command, you don't have to re-find your location.

    Also, when you are reordering the commands on a toolbar, it would not be that hard to implement drag and drop within the list control instead of replying on the "Move up" and "Move down" buttons.

    I consider the current implementation of the customization dialog just this side of a DOS application. I can't help but wonder what Microsoft was thinking when they created it.

Page 1 of 3 (31 items) 123