【WPF】 一加载就将主界面放在屏幕中央 在主界面的初始化InitializeComponent()之前加这一句 WindowStartupLocation = WindowStartupLocation.CenterScreen;