The calling thread must be STA, because many UI components require this.


  // Create a thread  
       Thread newWindowThread = new Thread(new ThreadStart(() =>  
       {  
         // You can use your code  
         // Create and show the Window  
         FaxImageLoad obj = new FaxImageLoad(destination);  
         obj.Show();  
         // Start the Dispatcher Processing  
         System.Windows.Threading.Dispatcher.Run();  
       }));  
       // Set the apartment state  
       newWindowThread.SetApartmentState(ApartmentState.STA);  
       // Make the thread a background thread  
       newWindowThread.IsBackground = true;  
       // Start the thread  
       newWindowThread.Start();  

Popular posts from this blog

WPF Crystal Report Viewer Using SAP

mvc razor textboxfor change event change another textboxfor value

ASP.NET MVC razor SAP Crystal report