通过设置Panel的Location实现,具体代码如下:
Panel.Location = new Point((this.Size.Width - Panel.Size.Width) / 2, (this.Size.Height - Panel.Size.Height) / 2);
通过设置Panel的Location实现,具体代码如下:
Panel.Location = new Point((this.Size.Width - Panel.Size.Width) / 2, (this.Size.Height - Panel.Size.Height) / 2);