且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从Windows Forms应用程序在另一个线程中打开WPF窗口

更新时间:2023-11-22 18:10:46

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.