private void DelayedRunUI(Action act) { var delayThread = new Thread(() => { Thread.Sleep(1000); SkylineWindow.Activate(); act(); }); delayThread.Start(); }