我有 3 个用户控件,我将它们插入到 3 个不同选项卡中的选项卡控件中。我的问题是,当我将用户控件插入选项卡控件时,按钮设计和面板设计发生了变化。一个例子是按钮有锋利的边缘而不是圆形。这是什么原因造成的?
这是我将用户控件插入选项卡控件的代码:
public void addUC(UserControl control, TabPage tab)
{
control.Parent = tab;
control.Anchor = (AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left);
}
Designer.cs 类:
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.adresseListPanel);
this.Controls.Add(this.landComboBox);
this.Controls.Add(this.searchPanel);
this.Name = "CustomerMainControl";
this.Size = new System.Drawing.Size(1291, 568);
this.Load += new System.EventHandler(this.CustomerMainControl_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.CustomerMainControl_KeyDown);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.adresseListPanel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.adresseDataGrid)).EndInit();
this.searchPanel.ResumeLayout(false);
this.searchPanel.PerformLayout();
this.ResumeLayout(false);
谁能帮我这个 ?