Best way to continuously monitor a MSMQ queue in WPF
<p>I need my WPF exe to start monitoring a queue as soon as it starts up, and then respond to messages as they come in.</p>

<p>The way I have it now is:</p>

<pre><code>public partial class App
    {

        readonly BackgroundWorker _worker = new BackgroundWorker();
        protected override void OnStartup(StartupEventArgs e)
        {
            _worker.DoWork += worker_DoWork;
            _worker.RunWorkerCompleted += worker_RunWorkerCompleted;
            _worker.RunWorkerAsync();

        }

        void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            _worker.DoWork += worker_DoWork;
            _worker.RunWorkerAsync();
        }

        static void worker_DoWork(object sender, DoWorkEventArgs e)
        {
           //do work
        }
</code></pre>

<p>Obviously, this is pretty pathetic IMO. </p>

<p>Also, I don't like the approach of using <code>while(true)</code>, inside the thread to keep it running indefinitely..</p>