Customizing toolbar items in VS2010 - visual-studio-2010

Has the menu & toolbar customization functionality in VS2010 been reduced?
I can't seem to be able to select an icon for an added command, nor set it to be icon-only. Previous versions of Visual Studio supported this functionality and even allowed the creation/editing of custom icons.
Is this something that has suffered as a result of the move to the WPF-authored UI or am I missing something?

Seems like this functionality was cut from Visual Studio 2010. This post has some info in the comments: Customizing Visual Studio 2010
Specifically - "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."
The reply also has a longer explanation of a workaround.

As noted in the link mentioned in the answer from #Gordon Mackie JoanMiro, the REASON for the reduced functionality is that the VS Shell team migrated the entire UI (shell and command system) from Win32 to one based solely on WPF. This was a gargantuan task, I would imagine. However, a couple workarounds are now available:
You can export previously saved settings from VS 2008 and import them into VS 2010. That includes command bar customizations (as noted by #Don)
A more recent blog-post contains detailed instructions for using a new extension to VS2010 (available on Visual Studio Gallery) that allows users to change the images on the command UI. (Note that the old drag&drop customization interface is still not supported in this new extension.)

If you have custom icons, any attempt to make ANY changes to the tool bar will result in the custom icons disappearing and being replaced by text when you restart VS2010.
The only way I found to get my custom icons without text into VS2010 is to open VS2008, set up all of the tool bars the way I want, including custom icons, then export the settings (Tools| Import and Export Settings). Then open VS2010 and import those settings. Tedious, I know, but it allows me to have a down arrow icon that searches for the next instance of the word my cursor is on.

I have been trying to customize VS2010 toolbars/keyboard and what took a few minutes in previous versions takes hours now. The new system looks real pretty but is useless in practice. Apart from the fact you just can't do (like change the appearance of buttons as mentioned above) the things you can do are extremely time-consuming and annoying.
Why is it every new version of VS loses something really useful? Other examples:
VC++5 introduced a new HTML help system. Pressing F1 on a function name used to immediately show help for that function. After VC++5 getting context help became annoyingly much slower, and is still very slow (and inaccurate).
VS.Net (aka VS2002 or VC++7) had a useless bookmark system compared to VC++6. VS2010 bookmarks are better but not perfect.
VS.Net removed the search state buttons "whole word", "case sensitive" etc. These were possibly the most useful buttons ever as they quickly allowed you to see why a search may have failed.

I found a great extension: CommandingImage
It does not have an icon editor, but you can create your images as 16x16 png format (for transparency) and import it (I recommend Paint.Net)

Dave, here's how to add toolbar buttons:
1) in the IDE, find the down arrow looking thing on the far right of a toolbar and click on Add Remove Buttons, Customize
2) in the Customize window select the Menu Bar radio button then select the appropriate menu bar that you want to add a button to
3) click the "Add Command..." button
4) select the appropriate Category and Command button that you want to add, then click OK.
The command button you selected will be added to the menu bar you selected. You can move the button up or down.
I think this is what you are looking for.
Good luck!

Related

How to quickly switch between layouts in Visual Studio?

I use different window-setups for Visual Studio depending on whether I'm at work, and have three monitors available, or e.g. at home, where I typically only have my laptop.
I've found a setup I like for each situation, and saved these using the export wizard, as shown below; for those who might not be aware, this can be done with the opton Tools -> Import and Export Settings.
I like the ability to do this, but I'd like it even more if I could do it without having to click a whoping 9 (!!) times to switch from one mode to the other. Ideally, I'd like to be able to "quick-switch" between home- and office-mode with just one or two clicks, but any improvement would help.
I know this might sound like an insignificant issue (which I suppose is true), but it's been bugging me for a while, and the only "improvement" I've been able to come up with so far is to add a button to the toolbar, as shown below. All this does though, is let me start the wizard without opening the Tools menu.
I can't possibly be the only one using this, so I'd like to know if there are any better ideas or solutions out there?
Visual Studio 2015 and 2017 support Loading and Saving different Window Layouts without using the Import/Export settings feature.
https://msdn.microsoft.com/en-us/library/4k7zyeba.aspx
Switch between the layouts
To switch between layouts, use the Keyboard shortcuts, or from the main menu choose Window > Apply Window Layout.
You can also create toolbar buttons that switch directly to a layout:

How to add controls from a control library to VS studio toolbox automatically (WP7)?

I want to achieve that when the user installs the WP7 control library he will find it in the Visual Studio toolbox automatically without manually adding it. In addition I would like to organize toolbox tabs in a logical manner.
I know it can be done for other platforms. For example I tried writing *.design.dll as described here - it does not work for WP7.
Any pointers how to work with toolbox for VS 2010 / WP7?
Nobody answered, so here is my brief summary:
The control library cannot be added to the Toolbox automatically unless you program VS plugin (package). Too much work for me...
*.design.dll (see the link above) basically works.
2a) You can hide controls from the Toolbox (BrowsableAttribute) and you can define control icons. That's probably everything you can do for Toolbox. The user has to add Toolbox tabs and "choose items" manually.
Well, I am not quite sure here, because when you drop the control dll file onto the Toolbox, then at least ToolboxTabNameAttribute works, i.e. corresponding Toolbox tabs are created automatically. Unfortunately, the tab is empty.
Also, when the control library is properly installed, then some of the controls are added to Choose items Toolbox dialog. Unfortunately, in my case most of the controls are missing and have to be added by manual browsing.
2b) Designer support (Properties window for the control) is better. You can hide properties (BrowsableAttribute), define categories (CategoryAttribute) and define descriptions (DescriptionAttribute).
Descriptions can be extracted from you documentation xml file, so that you don't need to write them again. To get the code google for MetadataBase.cs. Just be carefull, the files you'll find contain fatal bugs (ParseDescription method) and ignore some properties (getters that return a collection).
After all, the result is not that bad.

Lock down placement of panes from Visual Studio

Ok, if you're like me, you've accidentally dragged one of the many, many panes in Visual Studio around and spent some tedious time getting things back in order again.
Is there any way to lock down all the panes in Visual Studio so they cannot be dragged and placed elsewhere ?
When you have your pane layouts (as well as your fonts, toolbars, colour schemes and whatnot) the way you like them, export your settings (Tools, Import and Export Settings) and give the file a sensible name. Then if you have a spot of accidental dragging, just import your saved ones. This is better than Reset Layout if your preferred layout is not the default.
As far as I know, no. But everything for getting for working with tabs and tab groups is inside the "Window" menu item in VS. But if you want to reset everything back to the way it was why not try:
Window -> Reset Windows Layout
You might also want to check out this Arranging and Using Windows in Visual Studio, I think you might be able to create a workspace, save it and if needed reset back to it after you moved windows around.
Export your settings according to Mar's answer and then check out this extension:
http://visualstudiogallery.msdn.microsoft.com/a79072f7-3109-44a0-95c0-9c50e729d6a3
A real lifesaver :)
Feature request on User Voice:
Lock/Unlock Docked Window Layout
You can reset Visual Studio windows back to the default by going to Window->Reset Window Layout (Visual Studio 10). Other versions have something similar. This helps the tedium on dragging the windows back in order.

VS2010: Why do my custom Toolbox tabs and contained controls keep disappearing?

This is how I expected the toolbox to work:
Let's say I add a custom Tab to the Toolbox called "Ajaxtoolkit." To add controls to the new tab, I right mouse click and select "Choose Items" and browse to a file, Ajaxtoolkit.dll, that is of a particular version number.
I would expect that when I save and reopen the solution, that the Ajax Toolkit custom tab would still be in my Toolbox and that it would contain the same controls that were there last time, the controls that were in the dll that I referenced when the controls were added.
If I created a brand new web app, I (possibly) wouldn't expect to see the same Ajax Toolkit custom tab. However, I could perform the same steps as above and add a "Ajax Toolkit" tab and perhaps, this time, select a DIFFERENT VERSION of the tookit, and the state of the toolkit would be retained with each solution file.
Another possibility would be for the original Ajaxtoolkit to be retained when the 2nd web solution is created, and perhaps, if I wanted to mix versions of the toolkit across diffreent web sites in my solution, I should start naming my custom toolkit tabs with version specific names like "Ajaxtoolkit 4.0," etc.
...But instead, the Ajaxtoolkit tab disappears when I close VS2010 and reopen it.
Why? Is this desirable behavior or a bug?
You know VS2010 is a fully customizable IDE, may be these features conflicts your toolbox customization.

Visual Studio UI Improvement OCD Mode

I am wondering if anyone knows how to pull this off. Here goes.
I have a multi monitor setup, and I maximize Visual Studio to both windows. I create a new vertical document tab control, so that I have one document tab control in each physical screen. This is fine.
Now, I want to be able to make them work as if they were connected. I want to have the designer on one side, and the code related to the displayed designer on the other window.
I'd like it to have the following functionality:
If a item is double clicked on the solution explorer, open designer/code in both tabs.
When a document is selected in either pane, open appropriate file in the other pane.
Make the designer view refresh on edit, or periodically.
Any ideas on how I could pull this off?
Try to check (wait) for VS 2010 (beta now). There should be multi monitor support.

Resources