title: Dispatcher.Invoke hangs main window
body: <p>I've created new WPF project, in main window I'm doing:</p>
  
  <pre><code>public MainWindow()
  {
      InitializeComponent();
  
      Thread Worker = new Thread(delegate(){
  
          this.Dispatcher.BeginInvoke(DispatcherPriority.SystemIdle, new Action(delegate
          {
              while (true)
              {
                  System.Windows.MessageBox.Show("asd");
  
                  Thread.Sleep(5000);
              }
          }));
      });
  
      Worker.Start();
  }
  </code></pre>
  
  <p>the problem is between those messages MainWindow hangs. How do I get it work asynchronously?</p>