title: WPF TextBox not updating in UI every time PropertyChanged is raised
body: <p>I saw a lot of other questions around this, but none seemed to pertain, since my binding <em>is</em> working, but just not every time.</p>
  
  <p>I have a TextBox in my XAML.  </p>
  
  <pre><code>&lt;TextBox TextWrapping="Wrap" Text="{Binding ProgressMessages, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/&gt;
  </code></pre>
  
  <p>It is bound to a Dependency Property () in the ViewModel.</p>
  
  <pre><code>private string progressMessages;
  public string ProgressMessages
  {
      get { return progressMessages; }
      set
      {
          progressMessages = value;
          this.RaisePropertyChanged(() =&gt; this.ProgressMessages);
      }
  }
  </code></pre>
  
  <p>I have a method that updates ProgressMessages twice.  This method is bound to a Command that runs as a result of a button click.</p>
  
  <pre><code>private void GenerateInvoices()
  {
      ProgressMessages = "Starting execution of Generate Invoices on the HBApp Server";
      int numGenerated = GenerateInvoices(masterProcessId);  // runs for a few seconds
      ProgressMessages += "\n" + numGenerated.ToString() + " invoices have been generated.";
  }
  </code></pre>
  
  <p>Problem is, the first time <code>ProgressMessages</code> is modified in the above method, the change is not reflected in the UI immediately.  The TextBox remains blank.  But the second time I modify it, both strings show up at the same time.  It's not much of a progress indicator if all the progress messages show up all at once at the end!</p>
  
  <p><strong>What I tried:</strong></p>
  
  <p>I stepped through in the debugger, and ensured that <code>RaisePropertyChanged</code> was indeed invoked for both of the Sets - it was.</p>
  
  <p>I added <code>Mode=TwoWay</code>, and <code>UpdateSourceTrigger=PropertyChanged</code>, but to no avail.</p>
  
  <p><strong>Question</strong></p>
  
  <p>So what is it that's preventing the TextBox from showing the updated text <em>every</em> time I assign a new value to <code>ProgressMessages</code>?</p>
  
  <p>Could this be the Dispatcher deciding to lump multiple UI updates into one?  But I need it to update right away.</p>