How to open a window in a separate thread?

前端 未结 4 1794
慢半拍i
慢半拍i 2021-01-19 13:35

I\'d like to do:

Window newWindow = new Window();
newWindow.Show();

while (true) 
{
    Console.Write(\"spin\");
}

I.e., I\'m doing an int

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-19 14:25

    You don't - there's only one GUI thread. If you need to do blocking work, that stuff has to go in a background thread.

提交回复
热议问题