Launching a WPF Window in a Separate Thread

前端 未结 3 1905
佛祖请我去吃肉
佛祖请我去吃肉 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:22

    @d.moncada, @JPVenson, @TomTom sorry for everyone, espetially to @d.moncada, your answer made me realize my true error, indeed if run once until my code works. But my really problem is that i try to push button1_Click in two ocation, really i take a timer that called a method with the line of the

     private void button1_Click(object sender, RoutedEventArgs e)
    

    Now the solution of my problem is Detecting a Thread is already running in C# .net?

提交回复
热议问题