I want show a form as a dialog but problem is that the worker thread has stopped working and is now waiting for the main thread that is showing the dialog.
The worker thread should not wait and should start working in background. How can I accomplish this?
You haven’t said what your worker thread is doing. Assuming you’re already using a background thread, my guess is that you’re using
Control.InvokeorDispatcher.Invoke, which are blocking calls, in order to communicate with the UI.If you use
Control.BeginInvokeorDispatcher.BeginInvokeinstead, you won’t be blocked. Those calls just post a message to the UI thread without waiting for it to be processed.Of course, there may be something else going on – giving us more information would really help.