如何在form1.designer.cs中显示出设计器中所有控件的代码

MUF420 2016-04-06 08:30:43
我设计的一个window窗口里面加了很多label和textbox,之前不知道点了什么在form1.designer.cs中自动生成了这些控件的详细代码,比如各个控件的Point,Size,name等可以修改。请问怎么做到?
...全文
338 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
PALadinWIC 2016-04-06
  • 打赏
  • 举报
回复
form1.designer.cs里有一部分代码是被visual studio自动给折叠起来的,你展开来后就能看到了。 打开form1.designer.cs后,找找,有一处地方写的是“以下代码是编辑器自动生成的”。在这个地方,可以看到左边的加号,点击展开就会发现还有一大串内容。
Poopaye 2016-04-06
  • 打赏
  • 举报
回复
都在里面啊,没有Ctrl+F搜索下
MUF420 2016-04-06
  • 打赏
  • 举报
回复
我的意思是,我现在的designer里面显示不出来各个控件的详细代码,只有笼统的,怎么可以生成出来? 比如我这里面智能显示出 private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label14; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.TextBox textBox4; private System.Windows.Forms.TextBox textBox5; private System.Windows.Forms.TextBox textBox6; private System.Windows.Forms.TextBox textBox7; private System.Windows.Forms.TextBox textBox8; private System.Windows.Forms.TextBox textBox9; private System.Windows.Forms.TextBox textBox10; private System.Windows.Forms.TextBox textBox11; private System.Windows.Forms.TextBox textBox12; private System.Windows.Forms.TextBox textBox13; private System.Windows.Forms.TextBox textBox14; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; 我需要的是显示这些: this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.Location = new System.Drawing.Point(50, 45); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(49, 20); this.label1.TabIndex = 0; this.label1.Text = "名称"; this.label1.Click += new System.EventHandler(this.label1_Click); //
範先森 2016-04-06
  • 打赏
  • 举报
回复


是这个意思么?点击红色的出现的是样式,另一个控件详细代码

62,272

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧