How do I change the MessageBox location?

前端 未结 5 1012
醉梦人生
醉梦人生 2020-12-11 01:22

I need to change the message box location. I don\'t want it to be in the center of the page.

MessageBox.Show(\"Hello\");
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-11 02:06

    What you can do is to create a new window, set the property AllowsTransparency to true and set the Background to Transparent. In that window you can put a TextBlock, or a label and also add Yes/No Buttons. Set the location of this window using Canvs.SetTop(Window,TopPosition) and Canvas.SetLeft(Window,LeftPosition). next, call the window with the method Show() or ShowDialog().

提交回复
热议问题