WinForm窗体居中:this.StartPosition = FormStartPosition.CenterScreen;
WPF窗体居中: WindowStartupLocation = WindowStartupLocation.CenterScreen;