Opening a WPF Window in another Thread from a Windows Forms App

后端 未结 3 834
迷失自我
迷失自我 2021-02-15 19:15

OK, I should start this off by saying I\'m not sure this is necessarily the right way to deal with this but...

Basically I have created a Window in WPF for displaying no

3条回答
  •  轮回少年
    2021-02-15 20:04

    The WPF Threading Model has details on this. Look for "Multiple Windows, Multiple Threads."

    Basically, you start a new thread, which creates the relevant window and then calls

    System.Windows.Threading.Dispatcher.Run();
    

    in order to run a dispatcher for that window, on the new thread.

提交回复
热议问题