title: force TextBox to refresh
body: <p>I have a normal wpf TextBox control bound to a string property. I need the displayed text to be updated immediately after the binding or the .Text property is updated. I have tried </p>
  
  <pre><code>((TextBox)sender).GetBindingExpression(TextBox.TextProperty).UpdateSource();
  ((TextBox)sender).GetBindingExpression(TextBox.TextProperty).UpdateTarget();
  </code></pre>
  
  <p>in the TextChanged event handler.</p>
  
  <p>I've tried <code>UpdateSourceTrigger=Explicit</code> on the binding. I've tried</p>
  
  <pre><code>Application.Current.Dispatcher.BeginInvoke(
      DispatcherPriority.Input,
       new Action(() =&gt;
       {
           statusTextBox.Text = "newValue";
       }));
  </code></pre>
  
  <p>and many different combinations of these. But the text displayed changes only once the method I update the textbox from exits.</p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;TextBox x:Name="txBox" Height="150" Margin="0,0,0,0" VerticalAlignment="Top" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" AcceptsReturn="True"  VerticalContentAlignment="Top" Text="{Binding TextProperty}"Width="200" /&gt;
  </code></pre>