title: WPF update UI from async method
body: <p>In public <code>MainWindow()</code> I call <code>TestTask3(10000);</code>. A TextBlock Text is bound to Answer in the XAML. The <code>get</code> is called and the initial value is displayed.  I see the <code>set</code> call NotifyPropertyChanged.  But the <code>get</code> is not called a second time to get the new value.  I also have a button that changes Answer and that does change the TextBlock.  </p>
  
  <p>How to fix this or another approach?   I want to keep the UI reactive and update some UI elements after a delay.   </p>
  
  <pre><code>private int answser = -2;
  public int Answer
  {
      get { return answser; }
      set
      {
          if (answser != value)
          {
              answser = value;
              NotifyPropertyChanged("Answer");
          }
      }
  }
  public async void TestTask3(int delay)
  {
      Debug.WriteLine($"TestTask3");
      int answer = -1;
      int i = await Task.Run(() =&gt;
      {
          // … do compute-bound work here  
          Task.Delay(delay);
          answer = -1;
          return answer;
      });
      Debug.WriteLine($"TestTask3   {i}");
      Answer = answer;
      //return answer;
  }
  </code></pre>