Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make Visual Studio always show the Source view instead of the Design view when hitting F7 from a codebehind page?

The F7 key in Visual Studio - it allows the user to switch between the code for a designer element (e.g. a Windows Form or a Web User Control).

This works great in Windows forms: when I'm in the .cs file for a visual element (e.g. a User Control), it shows me the visual designer.

It doesn't work so great for me in ASP.NET: When I'm in the markup (e.g. the Source view of the Designer), it takes me to the CodeBehind, which is exactly what I want. However, once in the CodeBehind, it takes me back to the Design view on the Designer, which is never what I want.

How do I make Visual Studio always show the Source view instead of the Design view when hitting F7 from a Codebehind page?

like image 595
Josh Kodroff Avatar asked Oct 30 '09 18:10

Josh Kodroff


1 Answers

  1. Tools > Options > Keyboard

  2. Search for View.ToggleDesigner in "Show Commands Containing".

  3. Add new shortcut to Global with F7.

like image 73
Eduardo Cuomo Avatar answered Oct 04 '22 02:10

Eduardo Cuomo