title: How to update GUI continuously with async
body: <p>Just created a WPF project .net 4.6</p>
  
  <p>And have put this code inside</p>
  
  <p><code>lbl1</code> is a label on the GUI</p>
  
  <p>But the label is never updated or the while loop continue only 1 time</p>
  
  <pre><code>        private void Button_Click_1(object sender, RoutedEventArgs e)
      {
          var t = Task.Run(
         async () =&gt;
        {
             await AsyncLoop();
         });
  
      }
  
      async Task AsyncLoop()
      {
          while (true)
          {
              string result = await LoadNextItem();
              lbl1.Content = result;
          }
      }
  
      private static int ir11 = 0;
      async Task&lt;string&gt; LoadNextItem()
      {
          ir11++;
          return "aa " + ir11;
      }
  </code></pre>