title: UWP - Refresh ListView from a running async method
body: <p>I have written a method which sends an UDP broadcast und recieves the results in a loop which are instantly written in to a <code>List&lt;String&gt;</code>. Since I'm using <code>ReceiveAsync()</code> it is running asynchronous. </p>
  
  <p>My question is: how can I refresh the ListView in my UI each time the loop adds a string to my list. So I want the results to be displayed instantly on the screen as they appear in the list.</p>
  
  <p>Code</p>
  
  <pre><code>do
  {
      UdpReceiveResult result = await sclient.ReceiveAsync();
      ipList.Add(result.RemoteEndPoint.Address.ToString());
      // after this step I want the ListView to get refreshed
  } while (sclient.Available != 0);
  </code></pre>
  
  <p>XAML ListView Code</p>
  
  <pre><code>&lt;ListView x:Name="lbIps" HorizontalAlignment="Left" Height="174"
  Margin="450,151,0,0" VerticalAlignment="Top" Width="298" /&gt;
  </code></pre>
  
  <p>Code behind XAML</p>
  
  <pre><code> public async void btnBroadcast_Click(object sender, RoutedEventArgs e)
   {
      await ND2.run();
      lbIps1.ItemsSource = ND2.ipList;
   }
  </code></pre>