我有这个
public Result SomeMethod()
{
Popup popup = new Popup();
popup.Closed += PopupClosedHandler;
popup.ShowPopup();
// have to return the result from handler.
}
void PopupClosedHandler(EventArgs<PopupEventArgs> args)
{
Result result = args.Result;
}
我必须阻止SomeMethod()
调用,直到调用弹出窗口并在处理程序中返回Result
from args
。我不知道如何做到这一点,甚至不知道如何寻找它。谁能把我引向正确的方向?谢谢