So I currently have this code below, which has a background worker call showdialog(). However, I thought that the UI cannot be updated on a background thread, so how does the dialog display? Does the dialog actually get opened on the UI thread? what happens?

```
 public partial class ProgressDialog : Window
 { 
    BackgroundWorker _worker;
    public BackgroundWorker Worker
    {
      get { return _worker; }
    }

    public void RunWorkerThread(object argument, Func<object> workHandler)
    {
      //store reference to callback handler and launch worker thread
      workerCallback = workHandler;
      _worker.RunWorkerAsync(argument);

      //display modal dialog (blocks caller)
      //never returns null, but is a nullable boolean to match the dialogresult property
      ShowDialog();
    }

```

I have gotten suggestions that I just run the code and check, but how do i check whether the show dialog window was opened on a new thread or on the background thread itself? Not sure how I would check that. 

Anyway this was just a post to try to help my understanding of what is actually happening in my code. 

Anyway finally understood more of the comments, so I think I understand everything that is going on. Most of my real problems weren't caused by this dialog anyway, they were caused by updating observable collections from a non-ui thread while controls were bound to them.