Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make ChildWindow blocking

The ChildWindow is a modal window, but it does not block. Is there any way to make it blocking? I basically want a ShowDialog() method that will call ChildWindow.Show() but then not return until the user has closed the ChildWindow. I tried using Monitor.Enter() to block after ChildWindow.Show(), but the ChildWindow never rendered and the browser just hung. Anyone have any ideas?

like image 800
Mike Hall Avatar asked Aug 13 '09 17:08

Mike Hall


People also ask

How do you make a child window?

Creating a child window is like creating a main window—you use the CreateWindowEx function. To create a window of an application-defined window class, you must register the window class and provide a window procedure before creating the child window.

How do you close the child window when the parent closes?

If the goal is to close the child window when the parent is closed or refreshed, rather than actually detecting the event, you can use a setInterval to detect when the window.

How do you close a child window?

A child window opens as separate window as a tab. Go back to the parent and click “Close child” and the child window closes. Viola!


1 Answers

I don't believe it supports that behavior. You can vote for it on CodePlex. Depending on what you want, you might either look at some of Tim Heuer's workarounds here, or use a different custom control, like the Silverlight Modal Control (on CodePlex).

like image 71
Jon Galloway Avatar answered Sep 23 '22 01:09

Jon Galloway