首先新建一个WPF工程,在主界面添加一个按钮,并给按钮添加点击事件button1_Click,然后新建一个用于测试弹出位置的窗口TestWindow.1.在屏幕中间显示,设置window.WindowStartupLocation = WindowStartupLocation.CenterScreen; private void button1_Click(object sender, RoutedEventArgs e) { TestWindow window = new TestWindo…