title: Load WPF Image List async, in specific order
body: <p>I have a list of image paths which I need to update a UI with in an async manner:</p>
  
  <pre><code>foreach (string path in paths) {
      Task.Run(x =&gt; {
          var bitmap = getBitmap(path);
          Dispatcher.BeginInvoke((Action)() =&gt; Images.Add(new Image() { Source = bitmap; }));
      }); 
  }
  </code></pre>
  
  <p>This works great, except that the order my images are added aren't necessarily the order in which they exist in the list of <code>paths</code> (this is expected behavior, or course, though not desired behavior).</p>
  
  <p>Is there a way to run a loop of tasks in such a manner that one task does not complete until the prior task is completed?  </p>
  
  <p>I don't really care about the <code>getBitmap</code> queue order, but I want the Dispatch to happen in the same order as they're called per the <code>paths</code> list.</p>
  
  <p>If I can't control the order of each Dispatch invocation itself, is there a way I can order the tasks themselves so that one doesn't run until the prior one is complete?</p>