我想在主线程上创建一个窗口,使其表现得像messagebox
窗口。换句话说,我正在寻找类似的东西:
var myView = new Views.MyWindow();
myView.Show(); // I want to wait here until myView is closed?
// continue execution once myView is closed
我知道我可以创建一个信号量来实现这一点,并让另一个窗口在关闭后释放信号量,但是消息框窗口如何在同一个线程上做到这一点?