title: how to preload images in a background thread?
body: <p>In my WPF app i need to load some images. I only need to display one image at a time. If i load the image when it's needed, there is a slightly delay. So i thought to myself: "Hey, why not do some preloading in a background thread? Can't be that hard." I have some experience with threads, but not enough to know that this thought was wrong. I started programming and run into some problems. I fixed some of the problems and i probably could fix the other problems too, but that would result in spaghetti code. So, I think starting from the scratch would be the best. What initial planing is needed to build a nice and little preloading thread? Is there a pattern or something like that?</p>
  
  <p>Here's my current setup:</p>
  
  <ul>
  <li><code>LinkedList&lt;string&gt;</code> to stores pathes to the pictures and navigate to the next picture</li>
  <li><code>Dictionary&lt;string, BitmapImage&gt;</code> to store the preloaded images</li>
  </ul>