private static void DoControlPanel(object o) { _ctlDisp = Dispatcher.CurrentDispatcher; Application ctlApp = new Application(); ControlPanel panel = new ControlPanel((IntPtr)o); _proxy = new ControlPanelProxy(panel); _ready.Set(); // go! ctlApp.Run(panel); }