title: View not updating when property is changed by event from another thread
body: <p>I am trying to run something like a background thread and notify a ViewModel of the status of this background thread by raising an event. The ViewModel in turn raises the OnPropertyChanged event. Unfortunately the corresponding view will not update. </p>
  
  <p>The part of the background thread where I notify the ViewModel can be seen here: </p>
  
  <pre><code>private void RunThread() {
          while(true) {
              suspendEvent.WaitOne(Timeout.Infinite);
              if (shutDownEvent.WaitOne(0)) {
                  break;
              }
              if (pauseEvent.WaitOne(0)) {
                  pauseEvent.Reset();
              }
              Notify("Cleaning started!");
              pauseEvent.WaitOne(TimeSpan.FromSeconds(5));
              Clean();
              Notify("Cleaning finished!");
              pauseEvent.WaitOne(TimeSpan.FromSeconds(5));
  
          }
      }
  
  private void Notify( String status ) {
          NotifyOfCleanerStatusHandler handler = NotifyOfcleanerStatus;
          if (handler != null) {
              handler(status);
          }
      }
  </code></pre>
  
  <p>The part of the ViewModel where I receive the event can be seen here: </p>
  
  <pre><code>public void SetCleanerStatus( String status ) {
          CleanerStatus = status; 
      }
  </code></pre>
  
  <p>And finally, the property that I bind my view to is seen here: </p>
  
  <pre><code>public String CleanerStatus {
          get {
              return cleanerStatus;
          }
          set {
              if (value != null) {
                  cleanerStatus = value;
                  OnPropertyChanged("CleanerStatus");
              }
          }
      }
  </code></pre>
  
  <p>The intriguing thing is: The View will show one of the above statuses, either "Cleaning started!" or "Cleaning finished!". One would think that they should alternate in an interval of 5 seconds. This is not the case. </p>
  
  <p>If I remove the first waithandle call (pauseEvent.WaitOne(TimeSpan.FromSeconds(5));) the message in the view is "Cleaning finished" and stays that way. If i keep the line, the message is "Cleaning started!" and stays that way. Debugging shows that the line OnPropertyChanged(..) is reached. </p>
  
  <p>What am I doing wrong?</p>