从代码隐藏页面中按F7键时,如何使Visual Studio始终显示“源"视图而不是“设计"视图? [英] How do I make Visual Studio always show the Source view instead of the Design view when hitting F7 from a codebehind page?
问题描述
Visual Studio中的F7键-它允许用户在设计器元素(例如Windows窗体或Web用户控件)的代码之间切换.
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).
这在Windows窗体中效果很好:当我在.cs文件中找到视觉元素(例如用户控件)时,它向我展示了视觉设计器.
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.
在ASP.NET中,它对我来说并不那么有效:当我处于标记(例如Designer的Source视图)中时,它将带我进入CodeBehind,这正是我想要的.但是,一旦进入CodeBehind,它便带我回到设计器上的设计"视图,这是我永远都不需要的.
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.
当从代码隐藏页面中按F7键时,如何使Visual Studio始终显示源"视图而不是设计"视图?
How do I make Visual Studio always show the Source view instead of the Design view when hitting F7 from a codebehind page?
推荐答案
-
工具> 选项> 键盘
在"显示包含的命令"中搜索 View.Toggle
.
Search for View.Toggle
in "Show Commands Containing".
使用 F7 向 Global
添加新的快捷方式.
Add new shortcut to Global
with F7.
这篇关于从代码隐藏页面中按F7键时,如何使Visual Studio始终显示“源"视图而不是“设计"视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!