有没有办法在某些视觉选项中用一个按钮在 window 的中心设置一个控件?

Is there any way to set a control at the center of the window with one button in some Visual options?

我的问题不是关于在 window 调整大小后保持控件居中。我唯一想知道的是,我是否可以使用一些 Visual Studio 选项而不是手动操作来像下图那样将控件居中?

如果想把控件设置在window的中间,可以参考以下步骤:

首先创建一个 TableLayoutPanel 并编辑行和列。

其次可以在这个界面编辑行列样式。

然后您可以像这样将按钮添加到 TableLayoutPanel 中

最后 select TableLayoutPanel 并单击菜单上的格式,然后在窗体居中下选择水平。控件将设置在 window.

的中心