enabling design view in VS 2010 - visual-studio-2010

Does anyone know where can I enable the bar that let me switch between different views (Design,split,..) in Visual Studio 2010 ? I can't find it and it is not enables by default

If you go into the Visual Studio Tools -> Options menu, under HTML Designer -> General there is a checkbox to enable or disable the HTML designer. Checking this and restarting VS will do the trick and show the Design/Split/Source options at the bottom again.
I really prefer the Code Optimized setup but do need on occasion to hit the design view, shame it does not seem easier to expose and, when exposed, takes up more UI than it really needs to.

Do you have the Design/source tabs down in the bottom left corner of the window? (just above where your debug & immediate windows appear from in the default view). If you do, look further to the right of them, there is a splitter bar you can drag up to produce the split mode.

It's a corrupt installation, try reintall the VS

I also cannot see the Design/Source tab split. I could have sworn it was in VS2010 RC. Did they take it out of retail?? (I'm working with an Activity xaml file)

go to Tool->Option->General->Enabe Html Designer

Related

Three combos on the top of visual studio 2013 code file

I have Visual studio 2013, resharper 8.2 and the productivity tools power pack.
My visual studio has 3 combos at the top of the code editor instead of the normal 2.
The combos are:
project, class and members.
I want to get back to normal:
classes and members.
Any idea which of the following is causing it, and how ti disable this specific features?
I don't think as things currently stand that you can disable it, but its name is apparently "Context Switcher".
According to this MSDN blog, it would appear to be a new feature intended to help you manage shared files in Universal Apps. I agree that it's confusing, and I'm not a big fan.
A thorough search of the VS options for anything related to "Navigation Bar", "Context Switcher", or "Universal Apps" comes up empty and there don't seem to be any extensions offering this capability either. As far as I know these would be the main avenues for configuration, so my conclusion is that we are stuck with it until the next VS update or until someone gets around to making an extension that can disable it.
If you prefer, you can disable the navigation bar entirely in "Tools > Options > Text Editor > All Languages > Navigation Bar" (or you can disable the bar on a language by language basis.)
Update: As of Visual Studio 2013 Update 3, you can drag and adjust the relative sizing of the 3 drop down lists in the navigation bar.
From a little local testing it looks like the sizing you set is shared between all files and solutions and it persists after closing and reopening visual studio.
I shrank the context switcher down to just the visible text, and it feels more well proportioned and closer to the classic Class and Member drop down layout.
The answer comes from this Stack Overflow page

Can I have a panel like Toolbox only visible when in Design mode?

On my laptop I try to maximize workspace within Visual Studio. If I'm just dealing with code, I keep all of my panels on the left and right hidden via auto-hide.
However, if I'm working in Design mode I pin the toolbox, properties, etc so they're always visible. I was hoping to find a way to actually hide the panels when I tab to a file only dealing with text (not in Design mode), and regain the panel when I return to a tab in Design mode, no manual pinning/unpinning required. I'm not fond of just mousing over the panel tab so it pops into view. I like to keep them permanently there while in Design mode.
Going from http://i.stack.imgur.com/yYmHu.png to http://i.stack.imgur.com/AQLGP.png is basically what I'm referring to.
Thanks!
Im not sure if there's a better way but I was able to create a macro to do this. Open Macro IDE in Tools -> Macros -> Macros IDE. Open EnvironmentEvents under MyMacros. Add the following code:
Private Sub WindowEvents_WindowActivated(ByVal GotFocus As EnvDTE.Window, ByVal LostFocus As EnvDTE.Window) Handles WindowEvents.WindowActivated
If GotFocus.Caption.EndsWith(" [Design]") Then
DTE.Windows.Item(Constants.vsWindowKindProperties).AutoHides = False
Else
DTE.Windows.Item(Constants.vsWindowKindProperties).AutoHides = True
End If
End Sub
If the properties panel is not already opened, you add this code to open:
DTE.ExecuteCommand("View.PropertiesWindow")
Try to use Perspectives extension. After installing you can save your current layout as perspective (just like in Eclipse) in Visual Studio 2010 and then switch between them. The only bad thing is what you can't switch between them automatically. I don't know maybe we can modify sources of extension(if it's available).

How to show code outline in Visual Studio?

This kind of stuff exists in Eclipse:
But I've not found it in Visual Studio yet. Is there such a window to show code outline at all?
I tried both Document Outline and Class View windows. The Class View is close, but it only shows class information, can it come up with function info also?
One great plugin for VS is CodeMaid. It is powerful and it is open source!
You can also sort your methods within the CodeMaid Spade view.
Here is a screenshot.
Also non-free, but Jetbrains Resharper provides a File Structure Window, what perhaps is what you are searching for.
To display this dockable window, select from the menu: ReSharper → Windows → File Structure (default shortcut Ctrl+Alt+F
This question was asked quite a while ago and before Visual Studio Code existed but I found it when searching for how to do this with Visual Studio Code so I thought others might stumble on this question too so I thought I'd share my solution. Here's how to do it in Visual Studio Code. I'm using TypeScript but it works for JavaScript, too.
1) View -> Open View
2) select (or type) Outline
3) You'll now get an Outline palette that shows full information on the class including properties and functions.
In newer Visual Studio versions (e.g. 2015) you can see this directly in the solution explorer. Simply expand the .cs file and you will get the list of the methods in the order they are listed in the file. This is exactly the same as the Outline in Eclipse.
If you want to see the stuff alphabetically, open the file and between the tab pane and the editor, there is a row showing the project name, the class name with namespace, and a drop down with the available methods and properties.
not free, but if you install Visual AssistX, each document gets a dropdown box listing all methods in a file (alphabetically or in the order they occur)
check Class View again, it does show functions (but not per document). Also check out the Code Definition Window, extremely nice when combined with Class View.
You can use the Class View Window, or you can use outlining to collapse the code window to definitions (Ctrl-M-O and Ctrl M-L in the standard keyboard set up)
Trick is to call Ctrl+F2, then Tab, then Tab, then Down arrow. I've done it with this simple AutoHotkey script when I hit Ctrl+o:
#IfWinActive ahk_exe devenv.exe
^o::
Send ^{F2}
Send {Tab}
Send {Tab}
Send {Down}
return
#IfWinActive
It will show dropdown that is closest to Quick Outline in Eclipse or others.
There is now a free add-in available through the add-in manager in VS2010 that works quite well. It also has a dark theme.
VS10x Code Map v2
Screenshot:
Go To "Solution Explorer" and select your project; then select a class file you want to outline, then expand the little triangle just below that class (as shown in the figure below)
In VS2017 you can navigate between items in the file directly from the upper right corner of the Editor.
you can have document outline window by going to view-> Other Window -> Document Outline or you can have it using Ctrl+W, U
I am using VS-2008. You can have a look at the following links also:
http://wildermuth.com/2008/06/06/The_Document_Outline_in_Visual_Studio_2008
http://dotnetkicks.com/tipsandtricks/Visual_Studio_2008_Document_Outline_Split_View
Hope this answers your question.
// 2019 answer
There is an free extension for Visual Studio that provide code outline: https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav
I've started using VSCommands 10.
This has support for the most common languages used when developing in Visual Studio 2010, including JavaScript.
There's an extension provided Free, by Microsoft, that enables this and many other features into Visual Studio. The extension is Productivity Power Tools.
Ctrl+Shift+O comes closest to what you want
If you need more, see: discussion of the Outline Feature on github
If you use PHP, make sure you install full version as mentioned in the docs
Resharper has a feature of inspection. You can see incoming and outgoing calls from there.
shortcut: CTRL+ Shift + ALT +
A list of things you can use:
1.Visual Studio default's ClassView
2.Visual Assist's VA OUTLINE Feature
3.CodeMaid's Spade Feature
In Visual Studio Code, the popup outline is not called outline but symbol list. The command is "Go to Symbol in Editor...", and default shortcut is "Ctrl + Shift + O".
Checked again, the question is to Visual Studio, I guess it could be same with Visual Studio Code.

Customizing toolbar items in VS2010

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!

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