I have a lot of code that looks like this:
MyWindow window = new MyWindow(someParam, callingWindow)
With a MyWindow class containing something like this:
public MyWindow.Processing()
{
`
...
callingWindow.RefreshListBox();
}
Is there a built-in way to wait for a window to close. I would like to write something like this in the callWindow class:
await mywindowInstanceCloseEvent;
RefreshListBoxWhenWindowIsClosed();
I wonder if there is an easy way to “pause” a method (whether it is asynchronous or not) until a specific window is closed.
source
share