I'd like to do:
Window newWindow = new Window(); newWindow.Show(); while (true) { Console.Write("spin"); } I.e., I'm doing an intensive calculation in main window, but this new window (where I'm trying to show a busy indicator with an animation) is not responding (it's frozen)...
So I tried to do:
Thread thread = new Thread(() => { Window newWindow = new Window(); newWindow.Show(); }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); while (true) { Console.Write("spin"); } But the new window is still frozen, etc. Anyone know what's wrong here?