Is there a way to "bind" my Mouse4 button to "Navigate Backwards" in visual studio? - visual-studio-2010

The title pretty much explains the whole question. I'm using Visual Studio 2010 Premium, I like the Navigate Backward command for when I right click on something and do go to definition and then I want to go back to where I was Navigate Backward works. But I'm so used to my mouse button button doing that, I've noticed I've starting using it in Visual Studio and expecting it to go back but it doesn't. I know how to change the command to a different key press, but is there a way to make it work on a mouse button?

This seems to be a (pointless) Limitation of the C++ IDE in Visual Studio. In C# the mouse buttons work as expected, but not in C++.
There are several Addins for Visual Studio to cover this functionality, I'll point you to the one that I found in this answer:
http://www.codeproject.com/Articles/57119/Forward-Backward-Code-Navigation-with-the-Mouse-Th
This Add-In worked for me. I could also upgrade it to Visual Studio 2012 by simply changing the Version-Tag in the Addin-file to "11.0".

Related

Visual Studio 2015: Ctrl+Shift+8 (View.PopBrowseContext) to navigate back not working?

A keyboard shortcut that I've used frequently going back several Visual Studio versions is Ctrl+Shift+8 to go back to where I was, after doing a F12 to Go To Definition.
In Visual Studio 2015, pressing Ctrl+Shift+8 doesn't seem to do anything.
Opening up Visual Studio 2013 and looking at the Tools | Customize | Keyboard dialog, Ctrl+Shift+8 is mapped to the command View.PopBrowseContext. In Visual Studio 2015, Ctrl+Shift+8 has that same command mapping, but the command doesn't seem to work.
Is there a way to get the View.PopBrowseContext command to navigate back after doing a Go To Definition (F12) in Visual Studio 2015?
Visual Studio 2015 Connect -> View.PopBrowseContext command and others doesn't work (issue removed from Connect site by Microsoft)
Issue on GitHub -> Bring back Go to Definition Navigation Stack #14496
View.NavigateBackward (Ctrl+-) is not good replacement for View.PopBrowseContext (Ctrl+Shift+8). If you invoke Edit.GoToDefinition (F12) and then click a few times with the mouse moving the cursor around, all those moves are recorder in the navigation stack.
View.PopBrowseContext (Ctrl+Shift+8) redirects directly to the previous definition (the place that you invoked Edit.GoToDefinition (F12) last).
View.PopBrowseContext
Edit.GoToReference
View.BrowseNext
View.BrowsePrevious
Edit.GoToDeclaration
View.ForwardBrowseContext
Note: these commands were broken in Visual Studio 2015. Still do not work in Visual Studio 2017.
A workaround in Visual Studio 2015 is to press CTRL+- instead (mapped to the View.NavigateBackward command) to go back after a F12 press, instead of trying to use View.PopBrowseContext / Ctrl+Shift+8. (Reference)
When you first start Visual Studio, it offers you a choice of typical usage (not sure how it's called exactly): C++, C#, etc. I believe the initial keyboard binding depends on that choice.
I used FeinCtrl and noticed that View.PopBrowseContext is mapped to Ctrl+Num *, and it works just fine. The Ctrl+Shift+8 is mapped to Edit.ViewWhiteSpace for me...
Do you by chance have a conflict, when another command in a different scope is papped to the same shortcut keys?

Refactor menu missing from Visual Studio 2015

I am having trouble finding the right-click context menu in Visual Studio 2015. I know that nothing is wrong with my project or the file I am working. I can find the right-click context refactor menu in Visual Studio 2013. However, in Visual Studio 2015 there isn't a refactor context menu in the right-click context menu.
Where did it go? How do I get it back?
Your suggestion cannot include menu Edit → Refactor.
I have tried to reset my Visual Studio settings back to default using menu Tools → Import and Export Settings and that didn't bring the menu back either.
Some of the refactoring tools have been relocated or are at least accessible in a different manner than they were previously.
Using the extract method refactor as an example, you can still use this function; it is just not done the same as before:
Right click
Quick actions
Click extract Method
I think they've changed it to feel more "ReSharper"ey. All of the functionality should still be there however.
Here's more information on refactoring in Visual Studio 2015 - hopefully this helps! Refactoring (C#)
You no longer need to access the refactoring using the mouse right click.
It is recommended that you use the keyboard shortcut keys within Visual Studio.
For all possible shortcut keys, see Default Keyboard Shortcuts in Visual Studio, Refactor.
You might need to build the project to get it to work.
See Code Editing ASP.NET Web Forms in Visual Studio 2013 | Microsoft Docs. (If it is missing then the point is that I am using an example provided by Microsoft.). In Refactoring and Renaming see To extract a method in a C# page. When I follow the instructions I cannot find the feature to extract the code to a method. When I tried the Edit menu it said I did not have valid code. Then I built the project and the feature to extract the code was available and worked.
If you change the name of the object you are refactoring, the light bulb then appears to the left which asks if you wish to change the name of the object (i.e. refactor) or generate a new constructor for the new named object.
Ctrl + . is the shortcut key for extracting a method in Visual Studio 2015 and onward.
Ctrl+M, R does not work anymore in new versions.

Visual Studio 2013 Express Toolbox empty

I am trying to learn Visual Basic with the guidance of some YouTube Tutorials. They have recommended the use of Microsoft Visual Studio Express 2013 as it has a built in compiler. I encountered a problem where my toolbox bar on the left of my screen is empty. Does anyone know how to fix this?
http://gyazo.com/328ade3754613c971dd6d4745a0ed171 This is a link to my screenshot.
Just right click inside tools and click on "show all"
Your code may be running. Make sure to stop all processes and view the toolbox again.
On Visual Studio C++ 2012, it also happen sometimes. Try, to right click inside the Toolbox dialog and click on "Reset Toolbox" item. It should solve your problem.
See same question: How to rebuild the Visual Studio Toolbox?
What you need to do is to open your code in [Design] view. In this view you don't see the code as text, but rather as windows and buttons and so on.
Choose your favorite way to switch to the [Design] view :
A. View > Designer
B. Shift + F7
C. In the Solution Explorer window double click Form1.cs
Source:
How do I open a Visual Studio project in design view?

WPF Applications: Visual Studio vs. Expression Blend

I am a bit confused on how Visual Studio 2010 and Expression Blend 4 operate together. If I want to create a WPF application, should I start it in Expression Blend 4? If so, then how does Visual Studio 2010 natively open Expression Blend projects, or does it?
Or should I start my application in Visual Studio 2010? If so, how do I open my solution in Expression Blend.
Also, how do I modify an existing WPF form, if I need changes. If I already have events handled and code behind, how do I bring it over to expression blend, make my changes, then bring it back to visual studio without disrupting the events and code that I have created in Visual Studio 2010?
Also can someone recommend a good book that covers how to create WPF and/or Silverlight applications using Expression blend 4 and Visual Studio 2010 together.
Solutions are the same for Visual Studio and Expression Blend. You can open your solution through the file menu in expression blend, or by right clicking on a xaml file in Visual Studio and select "Open In Expression Blend".
Personally, when I need to make only a small change, like changing the text on a button, I don't go into Blend. But when I want to see what's going on, with margins and layout and stuff I always use Blend. Most often I have Visual Studio and Blend open side by side and I keep switching back and forth.
Because Expression Blend uses the same solution you don't have to worry about event handlers and such. When they are in place, they stay in place. Unless you delete the control the event is attached to of course.
Creating a solution can be done in both tools, but I start most projects in Visual Studio. There are however a few Project templates that can't be found in visual studio. For example the Databound Application project type. This will give you a start on an MVVM project, with folders in place for the Model, View and ViewModel.
You can have it open in both Visual Studio and Blend at the same time. You're prompted in Visual Studio if you make a change in Blend and vice versa.
Personally I create the new application in Visual Studio first then open it in Blend.
I usualy start my project in Blend.
Remember Blend is specially designed to make great UI, easy databindig, make easy templates and custom controls.
You can edit the code behind of your app directly in Blend but sometimes it doesn't show the intellisense; thats when you need open VS, to do that right click on your project inside blend and click on edit with Visual Studio. It'll launch VS and you can start coding.
You dont need to close VS or Blend, they booth can be open, if you make some change in VS it will notify Blend, will appear a dialogbox telling you: reload the app, click Yes the changes will be sincronized in Blend and VS, the same happens when you make changes in Blend and go to an already open instance of VS.
Too remember to install de VS tools, it will allow you to open Silverlight projects inside VS, if they arent already installed an error message will appear.
Hope my answer help you

Navigating backward and forward with the mouse in Visual Studio 2008

My install of Visual Studio 2008 does not support IE style back and forward navigation withe the mouse in the C# code editor.
Searches show that multiple people have run into this problem but I have yet to find a correct solution.
There's even a VS add-in hack just to work around the "bug".
Any idea why this functionality fails for some users and how to fix it?
You can mitigate the problem by AutoHotKey tool (free, open source).
Let's assume your Visual Studio 2008 has these editor commands and their respective shortcuts:
View.NavigateBackward = Ctrl+-
View.NavigateForward = Ctrl+Shift+-
You should be able to verify these shortcuts in keyboard options. Verified? Let's proceed.
So will you be just fine if your mouse will send these keyboard shortcuts if the Visual Studio's main window is active?
Then install the tool and add the following two mappings:
XButton1::^-
XButton2::^+-
These correspond to above keyboard shortcuts: ^ = Ctrl, + = Shift, - = -
Using AutoHotKey icon in notification area, reload definition file you just updated. Now your mouse buttons should produce the above shortcuts. Test them.
If they work for you in Visual Studio editor, you can limit them only to Visual Studio main window, otherwise they work across the entire desktop:
SetTitleMatchMode, RegEx
#IfWinActive, .*- Microsoft Visual Studio
XButton1::^-
XButton2::^+-
#IfWinActive
Feel free to adjust title-matching regex if needed.
Do not forget to reload definitions file to apply any changes you made.
Bonus:
And here are some other handy operations if you are holding Shift or Ctrl:
(You have those mouse buttons, let's use them... for commands across the entire desktop.)
+XButton1::^c
+XButton2::^v
^XButton1::^x
^XButton2::^z
(Letters must be lowercase, because uppercase means Shift+letter.)
(And always make sure you are running AHK elevated (as administrator.))
Enjoy!
Visual Studio 2008 is an editor and the apps built in it can also be built in any later version such as Visual Studio 2015. Not trying to be flippant, but the fix is to move to a later version of Studio. If money is a factor look into the Community version. (See Free Dev Tools - Visual Studio Community 2015)

Resources