How to get MessageBox.Show() to pop up in the middle of my WPF application?

前端 未结 6 1467
忘掉有多难
忘掉有多难 2020-12-17 08:39

I have a 700w x 300h WPF applciation and can drag it anywhere on my large screen.

When my application executes:

MessageBox.Show(\"Sorry, this functio         


        
6条回答
  •  余生分开走
    2020-12-17 09:34

    Another approach would be to create your own message box window and set window's startup location to center owner. The advantage is you can easily have your styles and customization, without hooking.

提交回复
热议问题