WPF窗口弹出居中显示

  private void Button_Click(object sender, RoutedEventArgs e)
        {
            //addCar();
            Window window = new addCarForm();
            window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            window.ShowDialog();
        }

 

你可能感兴趣的:(WPF)