Visual Studio 2013 Update 2 - Remove Project dropdown in C# navigation bar? - c#

I recently updated my Visual Studio 2013 to Update 2 RTM. Now for my C# files, the navigation bar has a new dropdown for Projects, instead of just having Types and Members like it used to. The Projects dropdown is taking up valuable screen real estate.
Is there a way to hide that Project dropdown in the navigation bar?
See this link for a picture of what a navigation bar looks like.
Update: I added a picture of what my navigation bar looks like for a C# file.

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.

A specific issue has been opened at:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/5748900-add-option-to-exclude-the-new-shared-file-dropdow
Please vote !

In Visual Studio 2013 Update 3, which was released this week (http://www.visualstudio.com/news/2014-aug-4-vs) , we have added the ability to re-size the splitters in the Navigation Bar to your own taste. We will save this setting for you. This means if you don't want to use real-estate on the Context Switcher, you can make it very small, but without changing the keyboard behavior of the Navigation Bar. We hope you like this change, which will also appear in the next public release of Visual Studio "14".

There is no (official anyway) way to hide the project dropdown currently. We are considering it though.
Please file a suggestion on http://visualstudio.uservoice.com or file a bug on https://connect.microsoft.com to get your feedback heard.

Related

Can I add some comment while debugging my application?

Is there a way in Visual Studio to add some comment to my code while I am executing debugging?
If I try to do it Visual Studio tells me that changes are not allowed.
Searching on Google I found many people that ask about this feature but I can't find a real solution to insert some comment into my code (only bookmarks).
Is it impossible or is there a way to accomplish this operation?
I know that in Java (using Eclipse) I can do it and it is very comfortable
Why not use the bookmark feature of visual studio?
Look under Edit->Bookmarks->Toggle Bookmark. On my machine that's a shortcut of holding Ctrl and tapping K twice.
There are shortcuts for previous/next bookmark, disable all, etc, etc.
You can also see a list of all bookmarks in the Bookmark Window (under the View menu) which allows you to name your bookmarks...
If you have enabled Edit and Continue (E&C), you should be able to edit code while your program is in break mode, e.g. you've hit a break point. It should be enabled by default, but if for some reason it isn't, you can read how to enable E&C here. For 64-bit applications, support for E&C was added with .NET 4.5.1.
If you just want to add comments as a deugging aid, i.e. not 'real' code comments, you can use a datatip aka pinned watched window's comment. Hover your mouse over a variable until the watch window pops up, pin it (top button) then expand comments (bottom button) and type whatever you want. These pinned windows are retained in between debugging sessions, and so are your comments. Combine this with bookmarks for quick navigation (Ctrl-k-k, Ctrk-k-n). Shown in action here, additional info here
Sure! you can both add comments to your codes and even modify your codes while debugging your application.
But, remember: you should Enable and Disable Edit and Continue(see here) as khellang said, and check you are in break mode(rather than debug mode).

Changing a buttons icon in with the visual studio SDK

I am using the Visual Studio SDK to add in some additional functionality to visual studio.
I have a button that when pressed will perform a potentially long running task (maybe 10-15 seconds) and I would like to change the button Icon to include some indication that the task is being performed, and then again change the icon to show that the task has been completed.
Reading through the MSDN articles has shown me how to customise my icon, but I am having trouble figuring out how to change it at run time. The MSDN article configures its icons in an xml config file.
Essentially my question is how do I control the button icon in code? I have provided the link to the MSDN article that I have been using below
http://msdn.microsoft.com/en-us/library/bb165158.aspx
Thanks in advance
James
It is not a good idea (it's non standard, you can use a progress dialog or the status bar of VS instead), but if you really want you can try the following approach:
1) Get the CommandBar that has the button
2) Get the CommandBarControl in the CommandBar.Controls collection
3) Cast the CommandBarControl to CommandBarButton
4) Use the CommandBarButton.Picture and CommandBarButton.Mask properties. See section #2 of my article:
HOWTO: Creating custom pictures for Visual Studio .NET add-ins commands, buttons and toolwindows.

Visual Studio extensibility

Based on our project we created several item and project templates which after installation using our installer works perfectly. this was really good step as it avoids spending time on setting up new projects or modules inside our enterprise application. Now we want to move forward and create something similar to the context menu inside visual studio when u click Views or Controls folder inside ASP.NET MVC application and in other types of projects as well (for example when u click your right mouse button on your WPF application, under Add menu u get different items which avoids opening new window where u have to search for item time.
My goal is to create add in or whatever it is called to make it even easier to work with our SDK so for example when developer right-clicks on project we want to have our own menu items under New menu so developers will be able to add OURPROGRAM View, OURPROGRAM view with validation. can anyone assist me with this? or how provide good examples of this?
Look for the Visual Studio SDK documentation on MSDN.
There is an open source Iron Python project which is your best resource.
http://msdn.microsoft.com/en-us/library/bb165436(v=vs.80).aspx
Also on MSDN there is a walkthru for creating a basic project system.
http://msdn.microsoft.com/en-us/library/cc512973.aspx

Is there a utility that can monitor open windows/ in .net winforms?

This is a general question, but I'll explain my specific need at the moment:
I want to find the framework class that enables one to choose an image at design-time. I can find the editor that is used at run-time - its the Drawing.Design.ImageEditor. At design time, however, a different editor pops up which allows one to choose an image from resources.
I'm guessing I could run some kind of program, then open up the image editor, from the property grid, and see what new windows/classes have been created?
Thanks
Yes, you can see what's being used by using another instance of Visual Studio and use Tools + Attach to Process (managed) to look at the call stack. It is a Microsoft.VisualStudio.Windows.Forms.ResourcePickerDialog. That is not something you can use in your own code, the Visual Studio designer assemblies are not re-distributable. Nor would they be useful, they monkey with the design-time state of the project.
Making you own isn't that hard, just use Reflection to iterate the properties of Properties.Resources and find the ones that have the Bitmap or Icon type. Display them in a ListView to allow the user to pick one. Adding resources at runtime isn't an option.
A tool with similar functionality to what you mention is Spy++ which you can find in your Visual Studio folder on the start menu (under the sub menu Visual Studio Tools).
However, if I understand you correctly, I don't think the design time editor you're talking about is written in managed code and even if it was, I'm fairly sure it's not in the framework. It's just part of Visual Studio itself and as far as I know you can't get hold of the source code for that.

XAML Editor hangs for 4-10 seconds driving me mad

I know similar questions exists but they don't address this exact problem.
I'm having an issue with Visual Studio 2008 SP1 whereby it hangs for 4-10 seconds whenever the xaml edit receives focus. It is literally driving me to despair and I'm about to move back to Winforms. Note - Just editing the straight up xaml (i.e no designer enabled) doesn't fix the issue.
I have done the following :
Disable the xaml designer
Disable all plugins Checked FileMon for activity during the hang (there is none)
Checked Disk / Paging for activity the hang (again, none)
Uninstalled Silverlight
Setup :
Windows XP64
8 Core Zeon, 16Gb RAM
The designer for XAML in VS 2008 is weak. Many of these issues have been addressed and dramatically improved in VS 2010 (even in beta 2).
I've started using Blend exclusively for designer-work, and just setup VS to use the XML editor (instead of the designer) for dealing with XAML files. This makes editing instantaneous within Visual Studio, although you need to swap out to Blend if you want a design time experience.
For me, the XML editor just didn't quite work right. What I did was in Tools/Options/Text Editor/XAML/Miscellaneous, activate "Always open documents in full XAML view." This prevents the IDE from trying to render your xaml at open and get right to editing your XAML. When you are ready to pay the render penalty, you can click on the design tab.
Because everyone knows writing xaml by hand is faster and more fun :)
I had exactly same issue with XAML editor - every time I focused, saved, opened XAML code, the Visual Studio got stuck for few seconds.
For me the solution was removing reference to Microsoft.mshtml - I don't understand the reason (if someone does, please comment), but it really was the only problem and removing the reference solved my nightmare.

Categories

Resources