且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在设计视图中打开 Visual Studio 项目?

更新时间:2023-01-31 09:50:49

您可以在解决方案资源管理器中直接双击代表您的表单的.cs文件:

You can double click directly on the .cs file representing your form in the Solution Explorer :

这将打开 Form1.cs [Design],其中包含拖放控件.

This will open Form1.cs [Design], which contains the drag&drop controls.

如果直接在后面的代码中(名为Form1.cs的文件,没有[Design]"),可以按Shift + F7 (或仅 F7 取决于项目类型)来打开它.

If you are directly in the code behind (The file named Form1.cs, without "[Design]"), you can press Shift + F7 (or only F7 depending on the project type) instead to open it.

在设计视图中,您可以按F7切换回代码隐藏.

From the design view, you can switch back to the Code Behind by pressing F7.