Launching a WPF Window in a Separate Thread

前端 未结 3 1904
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-21 08:03

I\'m using the following code for to open a window in a separate thread

public partial class App : Application
{
    protected override void OnStartup(Startu         


        
3条回答
  •  悲哀的现实
    2020-12-21 08:16

    why you trying to do this? there is (nearly)no reason to run a 2end UI thread inside you application ... if you want a non Modal new Window, instantiate you window and call show.

    Why nearly? Because this is a very complex topic and unless you have a huge budged to develop exactly this behavior, you can live without it.

提交回复
热议问题