当从代码隐藏页面按 F7 时,如何使 Visual Studio 始终显示源视图而不是设计视图?

2024-05-06

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视觉元素的文件(例如用户控制),它向我展示了视觉设计师。

它对我来说不太有效ASP.NET:当我处于标记中时(例如,Designer),它带我到隐藏代码,这正是我想要的。然而,一旦进入隐藏代码,它带我回到Design的看法Designer,这从来都不是我想要的。

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


  1. Tools > Options > Keyboard

  2. 搜索View.ToggleDesigner in "显示命令包含".

  3. Add new shortcut to Global with F7.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

当从代码隐藏页面按 F7 时,如何使 Visual Studio 始终显示源视图而不是设计视图? 的相关文章

随机推荐